#ifndef BATTLE_HERO_H_
#define BATTLE_HERO_H_
+#include "fwd.h"
+#include "AttackChoice.h"
#include "Stats.h"
+#include "../common/fwd.h"
+#include "../geometry/Vector.h"
#include "../graphics/Animation.h"
+#include "../graphics/fwd.h"
+#include "../graphics/Menu.h"
#include <vector>
#include <SDL.h>
-namespace common {
- class Item;
- class Spell;
-}
-namespace graphics {
- class Sprite;
-}
-
namespace battle {
class Hero {
const graphics::Animation *AttackAnimation() const { return attackAnimation; }
const graphics::Animation *SpellAnimation() const { return spellAnimation; }
+ geometry::Vector<int> &Position() { return position; }
+ const geometry::Vector<int> &Position() const { return position; }
+
+ graphics::Menu<const common::Spell *> &SpellMenu() { return spellMenu; }
+ const graphics::Menu<const common::Spell *> &SpellMenu() const { return spellMenu; }
+ graphics::Menu<const common::Item *> &IkariMenu() { return ikariMenu; }
+ const graphics::Menu<const common::Item *> &IkariMenu() const { return ikariMenu; }
+
+ AttackChoice &GetAttackChoice() { return attackChoice; }
+ const AttackChoice &GetAttackChoice() const { return attackChoice; }
+
+public:
+ void UpdateSpellMenu();
+ void UpdateIkariMenu(const Resources *);
+
// temporary setters until loader is implemented
public:
void SetName(const char *n) { name = n; }
void SetAttackAnimation(const graphics::Animation *a) { attackAnimation = a; }
void SetSpellAnimation(const graphics::Animation *a) { spellAnimation = a; }
+ static void CreateTypeDescription();
+ static void Construct(void *);
+
private:
const char *name;
graphics::Sprite *sprite;
graphics::AnimationRunner animation;
+ geometry::Vector<int> position;
+
+ graphics::Menu<const common::Spell *> spellMenu;
+ graphics::Menu<const common::Item *> ikariMenu;
+
+ AttackChoice attackChoice;
+
// TODO: vector does not seem to be a good choice
std::vector<const common::Spell *> spells;
- Uint16 maxHealth, health;
- Uint16 maxMana, mana;
+ int maxHealth, health;
+ int maxMana, mana;
Stats stats;
- Uint8 level;
- Uint8 ip;
+ int level;
+ int ip;
};