X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=3acc0b7699c79dd9ffeaef66c686d263c2a4d29e;hb=c0068263474818f39e704eee12f753c0419f7708;hp=77e2b5dbdfa214db81bcd6a8f1313b18e05ce49f;hpb=b9fdb4fd361fbc0c8e2c0df9615e6eed540917a1;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index 77e2b5d..3acc0b7 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -19,8 +19,8 @@ #include "../app/State.h" #include "../geometry/Point.h" #include "../geometry/Vector.h" +#include "../graphics/Animation.h" #include "../graphics/Menu.h" -#include "../graphics/SimpleAnimation.h" #include #include @@ -97,9 +97,6 @@ public: Monster &MonsterAt(int index) { return monsters[index]; } const Monster &MonsterAt(int index) const { return monsters[index]; } - graphics::SimpleAnimation &HeroAnimationAt(int index) { return heroAnimations[index]; } - const graphics::SimpleAnimation &HeroAnimationAt(int index) const { return heroAnimations[index]; } - const HeroTag &HeroTagAt(int index) const { return heroTags[index]; } const geometry::Point &HeroTagPositionAt(int index) const { return heroTagPositions[index]; } @@ -121,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 &); + public: geometry::Vector CalculateScreenOffset(SDL_Surface *screen) const { return geometry::Vector( (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 &offset); void RenderMonsters(SDL_Surface *screen, const geometry::Vector &offset); @@ -153,7 +159,6 @@ private: std::vector > heroesPositions; std::vector monsters; Hero heroes[4]; - graphics::SimpleAnimation heroAnimations[4]; graphics::Menu spellMenus[4]; graphics::Menu itemMenu; graphics::Menu ikariMenus[4];