X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHero.h;h=e200838487a177cef24e2ea0b200d1a35a99867f;hb=00b557a47e47d9410730d47d436f6158a3fb79f5;hp=499239d961beefa21410a3464d4e147eb2c86565;hpb=46d0e57f7823eaf07208fd5e0bdbd1e88b035382;p=l2e.git diff --git a/src/battle/Hero.h b/src/battle/Hero.h index 499239d..e200838 100644 --- a/src/battle/Hero.h +++ b/src/battle/Hero.h @@ -15,7 +15,10 @@ namespace common { class Item; class Spell; } -namespace graphics { class Sprite; } +namespace graphics { + class Animation; + class Sprite; +} namespace battle { @@ -66,6 +69,13 @@ public: bool HasRing() const { return ring; } bool HasJewel() const { return jewel; } + graphics::Animation *MeleeAnimation() { return meleeAnimation; } + const graphics::Animation *MeleeAnimation() const { return meleeAnimation; } + graphics::Animation *AttackAnimation() { return attackAnimation; } + const graphics::Animation *AttackAnimation() const { return attackAnimation; } + graphics::Animation *SpellAnimation() { return spellAnimation; } + const graphics::Animation *SpellAnimation() const { return spellAnimation; } + // temporary setters until loader is implemented public: void SetName(const char *n) { name = n; } @@ -87,6 +97,10 @@ public: void AddSpell(const common::Spell *s) { spells.push_back(s); } + void SetMeleeAnimation(graphics::Animation *a) { meleeAnimation = a; } + void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; } + void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; } + private: const char *name; graphics::Sprite *sprite; @@ -98,9 +112,12 @@ private: const common::Item *ring; const common::Item *jewel; + graphics::Animation *meleeAnimation; + graphics::Animation *attackAnimation; + graphics::Animation *spellAnimation; + // TODO: vector does not seem to be a good choice std::vector spells; - // TODO: equipment list Uint16 maxHealth, health; Uint16 maxMana, mana;