#include "../app/State.h"
#include "../geometry/Point.h"
#include "../geometry/Vector.h"
#include "../app/State.h"
#include "../geometry/Point.h"
#include "../geometry/Vector.h"
- BattleState(SDL_Surface *background, const PartyLayout &monstersLayout, const PartyLayout &heroesLayout, const graphics::Sprite *attackIcons, const graphics::Sprite *moveIcons)
+ BattleState(SDL_Surface *background, const PartyLayout &monstersLayout, const PartyLayout &heroesLayout, const Resources *res)
: background(background)
, monstersLayout(&monstersLayout)
, heroesLayout(&heroesLayout)
: background(background)
, monstersLayout(&monstersLayout)
, heroesLayout(&heroesLayout)
AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; }
MoveMenu &GetMoveMenu() { return moveMenu; }
bool HasMoreHeroes() const { return activeHero < (int) heroes.size(); }
void NextHero() { ++activeHero; }
AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; }
MoveMenu &GetMoveMenu() { return moveMenu; }
bool HasMoreHeroes() const { return activeHero < (int) heroes.size(); }
void NextHero() { ++activeHero; }
+ bool BeforeFirstHero() const { return activeHero < 0; }
+ void PreviousHero() { --activeHero; }
+ Hero &ActiveHero() { return heroes[activeHero]; }
+ const Hero &ActiveHero() const { return heroes[activeHero]; }
bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; }
void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; }
void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }