]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
added sword attack animation
[l2e.git] / src / battle / BattleState.h
index a901c63f68ccf028063fec9ebc8a21d3313376be..3acc0b7699c79dd9ffeaef66c686d263c2a4d29e 100644 (file)
@@ -19,6 +19,7 @@
 #include "../app/State.h"
 #include "../geometry/Point.h"
 #include "../geometry/Vector.h"
+#include "../graphics/Animation.h"
 #include "../graphics/Menu.h"
 
 #include <vector>
@@ -84,8 +85,7 @@ public:
        graphics::Menu<const common::Item *> &GetItemMenu() { return itemMenu; }
        const graphics::Menu<const common::Item *> &GetItemMenu() const { return itemMenu; }
 
-       bool HasMoreHeroes() const { return activeHero < numHeroes; }
-       void NextHero() { ++activeHero; }
+       void NextHero();
        bool BeforeFirstHero() const { return activeHero < 0; }
        void PreviousHero() { --activeHero; }
        void SwapHeroes(int lhs, int rhs);
@@ -118,14 +118,23 @@ public:
        void SetRunaway() { ranAway = true; }
        void ClearAllAttacks();
 
+       struct Order {
+               Order(int index, bool isMonster)
+               : index(index), isMonster(isMonster) { }
+               int index;
+               bool isMonster;
+       };
+
+       void WriteOrder(std::vector<Order> &);
+
 public:
        geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
                return geometry::Vector<int>(
                                (screen->w - background->w) / 2,
                                (screen->h - background->h) / 2);
        }
-       int BackgroundWidth() const { return background->w; }
-       int BackgroundHeight() const { return background->h; }
+       int Width() const { return background->w; }
+       int Height() const { return background->h; }
 
        void RenderBackground(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderMonsters(SDL_Surface *screen, const geometry::Vector<int> &offset);