X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHero.h;h=97a21c23377d177d855db1bbdcda0194266bbf24;hb=bbf7120b50c68867fe48844abc93ff1383bf5ec7;hp=11f1e332400eeed439b8fe021931af1dcd265d88;hpb=e559a146d268996a3367e370213b09a3b190e0bc;p=l2e.git diff --git a/src/battle/Hero.h b/src/battle/Hero.h index 11f1e33..97a21c2 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,10 +69,10 @@ public: bool HasRing() const { return ring; } bool HasJewel() const { return jewel; } - int AttackFrames() const { return attackFrames; } - int AttackFrameTime() const { return attackFrameTime; } - int SpellFrames() const { return spellFrames; } - int SpellFrameTime() const { return spellFrameTime; } + 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: @@ -92,8 +95,8 @@ public: void AddSpell(const common::Spell *s) { spells.push_back(s); } - void SetAttackFrames(int num, int time) { attackFrames = num; attackFrameTime = time; } - void SetSpellFrames(int num, int time) { spellFrames = num; spellFrameTime = time; } + void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; } + void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; } private: const char *name; @@ -106,14 +109,12 @@ private: const common::Item *ring; const common::Item *jewel; + graphics::Animation *attackAnimation; + graphics::Animation *spellAnimation; + // TODO: vector does not seem to be a good choice std::vector spells; - int attackFrames; - int attackFrameTime; - int spellFrames; - int spellFrameTime; - Uint16 maxHealth, health; Uint16 maxMana, mana;