X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHero.h;h=c15c2dcbc08bf4d25cc73f7b0734b54ef4463760;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=275db6da22a160ef1cf8c4815ad55a0da7145248;hpb=2a3e39f2960bd359dfc8df8f439281dec30c633a;p=l2e.git diff --git a/src/battle/Hero.h b/src/battle/Hero.h index 275db6d..c15c2dc 100644 --- a/src/battle/Hero.h +++ b/src/battle/Hero.h @@ -10,6 +10,7 @@ #include "AttackChoice.h" #include "Stats.h" +#include "../geometry/Vector.h" #include "../graphics/Animation.h" #include "../graphics/Menu.h" @@ -26,6 +27,8 @@ namespace graphics { namespace battle { +class Resources; + class Hero { public: @@ -85,6 +88,9 @@ 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; } @@ -93,6 +99,10 @@ public: 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; } @@ -120,6 +130,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; @@ -137,6 +150,8 @@ private: graphics::AnimationRunner animation; + geometry::Vector position; + graphics::Menu spellMenu; graphics::Menu ikariMenu; @@ -145,13 +160,13 @@ private: // 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; };