X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHero.h;h=385962faeb0a7e7642e8e08c7d063a81227c0839;hb=e02068d51f5e7f82d4d3195e9a9ce5c9d76f727d;hp=fd90a1bb175b9e879e791111e3bd68e3d594f9d4;hpb=e3a38cbb756b2f0b77afcf91bf2a397bb1677bce;p=l2e.git diff --git a/src/battle/Hero.h b/src/battle/Hero.h index fd90a1b..385962f 100644 --- a/src/battle/Hero.h +++ b/src/battle/Hero.h @@ -8,20 +8,18 @@ #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 #include -namespace common { - class Item; - class Spell; -} -namespace graphics { - class Sprite; -} - namespace battle { class Hero { @@ -83,6 +81,21 @@ public: const graphics::Animation *AttackAnimation() const { return attackAnimation; } const graphics::Animation *SpellAnimation() const { return spellAnimation; } + geometry::Vector &Position() { return position; } + const geometry::Vector &Position() const { return position; } + + graphics::Menu &SpellMenu() { return spellMenu; } + const graphics::Menu &SpellMenu() const { return spellMenu; } + graphics::Menu &IkariMenu() { return ikariMenu; } + const graphics::Menu &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; } @@ -110,6 +123,9 @@ public: 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; @@ -127,16 +143,23 @@ private: graphics::AnimationRunner animation; + geometry::Vector position; + + graphics::Menu spellMenu; + graphics::Menu ikariMenu; + + AttackChoice attackChoice; + // TODO: vector does not seem to be a good choice std::vector spells; - Uint16 maxHealth, health; - Uint16 maxMana, mana; + int maxHealth, health; + int maxMana, mana; Stats stats; - Uint8 level; - Uint8 ip; + int level; + int ip; };