X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=654e147d8ed60a677be4107f314dbc41783413aa;hb=9718062e6ed305d9f8f1674ff172079688e78088;hp=e9eca69000c262ce599cfb578ef986d463039080;hpb=10f374a7dadbd3f239fc0abc76094e3e45889f95;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index e9eca69..654e147 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -84,12 +84,8 @@ public: AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; } MoveMenu &GetMoveMenu() { return moveMenu; } - graphics::Menu &GetSpellMenu() { assert(activeHero >= 0 && activeHero < NumHeroes()); return heroes[activeHero].SpellMenu(); } - const graphics::Menu &GetSpellMenu() const { assert(activeHero >= 0 && activeHero < NumHeroes()); return heroes[activeHero].SpellMenu(); } - graphics::Menu &GetIkariMenu() { assert(activeHero >= 0 && activeHero < NumHeroes()); return heroes[activeHero].IkariMenu(); } - const graphics::Menu &GetIkariMenu() const { assert(activeHero >= 0 && activeHero < NumHeroes()); return heroes[activeHero].IkariMenu(); } - graphics::Menu &GetItemMenu() { return itemMenu; } - const graphics::Menu &GetItemMenu() const { return itemMenu; } + graphics::Menu &ItemMenu() { return itemMenu; } + const graphics::Menu &ItemMenu() const { return itemMenu; } void NextHero(); bool BeforeFirstHero() const { return activeHero < 0; } @@ -106,22 +102,14 @@ public: const HeroTag &HeroTagAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTags[index]; } const geometry::Point &HeroTagPositionAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTagPositions[index]; } - bool HasChosenAttackType() const { return ActiveHeroAttackChoice().GetType() != AttackChoice::UNDECIDED; } - AttackChoice &ActiveHeroAttackChoice() { return AttackChoiceAt(activeHero); } - const AttackChoice &ActiveHeroAttackChoice() const { return AttackChoiceAt(activeHero); } - AttackChoice &AttackChoiceAt(int index) { assert(index >= 0 && index < NumHeroes()); return heroes[index].GetAttackChoice(); } - const AttackChoice &AttackChoiceAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroes[index].GetAttackChoice(); } - AttackChoice &MonsterAttackChoiceAt(int index) { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; } - const AttackChoice &MonsterAttackChoiceAt(int index) const { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; } + bool HasChosenAttackType() const { return ActiveHero().GetAttackChoice().GetType() != AttackChoice::UNDECIDED; } 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) const { return index >= 0 && index < numHeroes; } void SetRunaway() { ranAway = true; } @@ -173,10 +161,7 @@ private: AttackTypeMenu attackTypeMenu; MoveMenu moveMenu; // TODO: combine all data about heros or monsters - std::vector > monsterPositions; - std::vector > heroesPositions; std::vector monsters; - std::vector monsterAttacks; std::vector attackOrder; Hero heroes[4]; graphics::Menu itemMenu;