X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.h;h=0891a2d246c5f4451518e1312ba990317a5cdcf1;hb=9cfff98ffce0529c685fbd5aa52e213c295449a1;hp=e4d787e741e87856be256f9f626554b78d49263b;hpb=c6156f6b3dc88a97a78694a2652dfbc874fcc8e4;p=l2e.git diff --git a/src/battle/Monster.h b/src/battle/Monster.h index e4d787e..0891a2d 100644 --- a/src/battle/Monster.h +++ b/src/battle/Monster.h @@ -9,12 +9,12 @@ #define BATTLE_MONSTER_H_ #include "Stats.h" +#include "../graphics/Animation.h" #include namespace common { class Item; } namespace graphics { - class Animation; class Sprite; } @@ -52,9 +52,12 @@ public: const /* Script */ void *AttackScript() { return attackScript; } const /* Script */ void *DefenseScript() { return defenseScript; } - graphics::Animation *AttackAnimation() { return attackAnimation; } + graphics::AnimationRunner &GetAnimation() { return animation; } + const graphics::AnimationRunner &GetAnimation() const { return animation; } + void SetAnimation(const graphics::AnimationRunner &a) { animation = a; } + + const graphics::Animation *MeleeAnimation() const { return meleeAnimation; } 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 @@ -69,8 +72,9 @@ public: void SetStats(const Stats &s) { stats = s; } void SetReward(Uint16 exp, Uint16 gold) { expReward = exp; goldReward = gold; } - void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; } - void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; } + void SetMeleeAnimation(const graphics::Animation *a) { meleeAnimation = a; } + void SetAttackAnimation(const graphics::Animation *a) { attackAnimation = a; } + void SetSpellAnimation(const graphics::Animation *a) { spellAnimation = a; } private: const char *name; @@ -79,8 +83,11 @@ private: /* Script */ void *attackScript; /* Script */ void *defenseScript; - graphics::Animation *attackAnimation; - graphics::Animation *spellAnimation; + const graphics::Animation *meleeAnimation; + const graphics::Animation *attackAnimation; + const graphics::Animation *spellAnimation; + + graphics::AnimationRunner animation; Uint16 maxHealth, health; Uint16 maxMana, mana;