, res(res)
, attackTypeMenu(res->attackIcons)
, moveMenu(res->moveIcons)
- , activeHero(-1) { }
+ , activeHero(-1)
+ , ranAway(false) { }
public:
void AddMonster(const Monster &);
virtual void Resize(int width, int height);
- virtual void HandleInput(const app::Input &);
+ virtual void HandleEvents(const app::Input &);
virtual void UpdateWorld(float deltaT);
virtual void Render(SDL_Surface *);
const Hero &ActiveHero() const { return heroes[activeHero]; }
Hero &HeroAt(std::vector<Hero>::size_type index) { return heroes[index]; }
const Hero &HeroAt(std::vector<Hero>::size_type index) const { return heroes[index]; }
+ void SwapHeroes(std::vector<Hero>::size_type lhs, std::vector<Hero>::size_type rhs);
const HeroTag &ActiveHeroTag() const { return heroTags[activeHero]; }
const HeroTag &HeroTagAt(std::vector<Hero>::size_type index) const { return heroTags[index]; }
const geometry::Point<int> &HeroTagPositionAt(std::vector<Hero>::size_type index) const { return heroTagPositions[index]; }
void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
AttackChoice &ActiveHeroAttackChoice() { return attackChoices[activeHero]; }
const AttackChoice &ActiveHeroAttackChoice() const { return attackChoices[activeHero]; }
+ const AttackChoice &AttackChoiceAt(std::vector<Hero>::size_type index) const { return attackChoices[index]; }
TargetSelection &ActiveHeroTargets() { return attackChoices[activeHero].Selection(); }
const TargetSelection &ActiveHeroTargets() const { return attackChoices[activeHero].Selection(); }
bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
std::vector<Hero> &Heroes() { return heroes; }
const std::vector<Hero> &Heroes() const { return heroes; }
+ void SetRunaway() { ranAway = true; }
+
public:
geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
return geometry::Vector<int>(
private:
void LoadSpellMenu(std::vector<Hero>::size_type heroIndex);
+ void LoadIkariMenu(std::vector<Hero>::size_type heroIndex);
void LoadInventory();
private:
geometry::Point<int> heroTagPositions[4];
AttackChoice attackChoices[4];
int activeHero;
+ bool ranAway;
};