X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=40dd51d9f671d8b79fb8a9c63d72d2586ad62c14;hb=854e5229c3f30bf88aa08d7f0aff56a1411c3367;hp=f5bf9cb1b915ee9e60de2a3516104adac9842052;hpb=35f8a25fc914f10a8e987357bab94584af0992fb;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index f5bf9cb..40dd51d 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -15,9 +15,11 @@ #include "Monster.h" #include "MoveMenu.h" #include "Resources.h" +#include "SmallHeroTag.h" #include "../app/State.h" #include "../geometry/Point.h" #include "../geometry/Vector.h" +#include "../graphics/Animation.h" #include "../graphics/Menu.h" #include @@ -83,8 +85,7 @@ public: graphics::Menu &GetItemMenu() { return itemMenu; } const graphics::Menu &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); @@ -106,12 +107,13 @@ public: bool AttackSelectionDone() const { return activeHero >= numHeroes; } int NumHeroes() const { return numHeroes; } + int MaxHeroes() const { return 4; } int MaxMonsters() const { return monsters.size(); } const std::vector > &MonsterPositions() const { return monsterPositions; } bool MonsterPositionOccupied(int index) { return index >= 0 && index < int(monsters.size()) && monsters[index].Health() > 0; } const std::vector > &HeroesPositions() const { return heroesPositions; } - bool HeroPositionOccupied(int index) { return index >= 0 && index < numHeroes; } + bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; } void SetRunaway() { ranAway = true; } void ClearAllAttacks(); @@ -129,6 +131,7 @@ public: void RenderMonsters(SDL_Surface *screen, const geometry::Vector &offset); void RenderHeroes(SDL_Surface *screen, const geometry::Vector &offset); void RenderHeroTags(SDL_Surface *screen, const geometry::Vector &offset); + void RenderSmallHeroTags(SDL_Surface *screen, const geometry::Vector &offset); private: void LoadSpellMenu(std::vector::size_type heroIndex); @@ -151,7 +154,9 @@ private: graphics::Menu itemMenu; graphics::Menu ikariMenus[4]; HeroTag heroTags[4]; + SmallHeroTag smallHeroTags[4]; geometry::Point heroTagPositions[4]; + geometry::Point smallHeroTagPositions[4]; AttackChoice attackChoices[4]; int numHeroes; int activeHero;