+public:
+ const Resources &Res() const { return *res; }
+ 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(); }
+
+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; }
+