]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Monster.h
added constructors for described types
[l2e.git] / src / battle / Monster.h
index e4d787e741e87856be256f9f626554b78d49263b..db37dfebe0d0bb00873309387168f5b80a408399 100644 (file)
@@ -8,13 +8,15 @@
 #ifndef BATTLE_MONSTER_H_
 #define BATTLE_MONSTER_H_
 
+#include "AttackChoice.h"
 #include "Stats.h"
+#include "../geometry/Vector.h"
+#include "../graphics/Animation.h"
 
 #include <SDL.h>
 
 namespace common { class Item; }
 namespace graphics {
-       class Animation;
        class Sprite;
 }
 
@@ -52,11 +54,17 @@ 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; }
 
+       geometry::Vector<int> &Position() { return position; }
+       const geometry::Vector<int> &Position() const { return position; }
+
 // temporary setters until loader is implemented
 public:
        void SetName(const char *n) { name = n; }
@@ -69,8 +77,15 @@ 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; }
+
+       AttackChoice &GetAttackChoice() { return attackChoice; }
+       const AttackChoice &GetAttackChoice() const { return attackChoice; }
+
+       static void CreateTypeDescription();
+       static void Construct(void *);
 
 private:
        const char *name;
@@ -79,8 +94,15 @@ 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;
+
+       geometry::Vector<int> position;
+
+       AttackChoice attackChoice;
 
        Uint16 maxHealth, health;
        Uint16 maxMana, mana;