From 4956380d5109fe57722a968ad1ffbf2fa0a5ed2e Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 11 Aug 2012 15:58:45 +0200 Subject: [PATCH] turned battle's menu vectors into arrays --- src/battle/BattleState.cpp | 4 ++-- src/battle/BattleState.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index b5c91f8..9e84206 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -64,9 +64,9 @@ void BattleState::EnterState(Application &ctrl, SDL_Surface *screen) { monstersLayout->CalculatePositions(background->w, background->h, monsterPositions); heroesLayout->CalculatePositions(background->w, background->h, heroesPositions); for (vector::size_type i(0), end(heroes.size()); i < end; ++i) { - spellMenus.push_back(res->spellMenuPrototype); + spellMenus[i] = res->spellMenuPrototype; LoadSpellMenu(i); - ikariMenus.push_back(res->ikariMenuPrototype); + ikariMenus[i] = res->ikariMenuPrototype; LoadIkariMenu(i); heroTags[i] = HeroTag(this, i); } diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index 347afc3..7dbd016 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -148,9 +148,9 @@ private: std::vector > heroesPositions; std::vector monsters; std::vector heroes; - std::vector > spellMenus; + graphics::Menu spellMenus[4]; graphics::Menu itemMenu; - std::vector > ikariMenus; + graphics::Menu ikariMenus[4]; HeroTag heroTags[4]; geometry::Point heroTagPositions[4]; AttackChoice attackChoices[4]; -- 2.39.2