]> git.localhorst.tv Git - l2e.git/commitdiff
turned battle's menu vectors into arrays
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 11 Aug 2012 13:58:45 +0000 (15:58 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 11 Aug 2012 13:58:45 +0000 (15:58 +0200)
src/battle/BattleState.cpp
src/battle/BattleState.h

index b5c91f8ca6b03587bf9605111ed0e6814097e1c9..9e84206b3908dde82be2eba8fec5da82bf4e8661 100644 (file)
@@ -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<Hero>::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);
        }
index 347afc3f744e7bc3bfb2cec893c16f9aee48288e..7dbd016d8717ff8415a1ed63aa8d0f717ffbd54d 100644 (file)
@@ -148,9 +148,9 @@ private:
        std::vector<geometry::Point<int> > heroesPositions;
        std::vector<Monster> monsters;
        std::vector<Hero> heroes;
-       std::vector<graphics::Menu<const common::Spell *> > spellMenus;
+       graphics::Menu<const common::Spell *> spellMenus[4];
        graphics::Menu<const common::Item *> itemMenu;
-       std::vector<graphics::Menu<const common::Item *> > ikariMenus;
+       graphics::Menu<const common::Item *> ikariMenus[4];
        HeroTag heroTags[4];
        geometry::Point<int> heroTagPositions[4];
        AttackChoice attackChoices[4];