From: Daniel Karbach Date: Sat, 11 Aug 2012 13:58:45 +0000 (+0200) Subject: turned battle's menu vectors into arrays X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=4956380d5109fe57722a968ad1ffbf2fa0a5ed2e;p=l2e.git turned battle's menu vectors into arrays --- 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];