]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
added spells
[l2e.git] / src / battle / BattleState.h
index 1a0586c9025e31b42113468bc06c50e607517bfe..ff0672da84a2f365b8379455437c109e72779c41 100644 (file)
@@ -27,6 +27,7 @@ namespace app { class Input; }
 namespace common {
        class Inventory;
        class Item;
+       class Spell;
 }
 namespace graphics {
        class Font;
@@ -92,8 +93,8 @@ public:
        const TargetSelection &ActiveHeroTargets() const { return attackChoices[activeHero].Selection(); }
        bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
 
-       graphics::Menu</* Spell */ void *> &GetSpellMenu() { return spellMenus[activeHero]; }
-       const graphics::Menu</* Spell */ void *> &GetSpellMenu() const { return spellMenus[activeHero]; }
+       graphics::Menu<const common::Spell *> &GetSpellMenu() { return spellMenus[activeHero]; }
+       const graphics::Menu<const common::Spell *> &GetSpellMenu() const { return spellMenus[activeHero]; }
        graphics::Menu</* Ikari or Item */ void *> &GetIkariMenu() { return ikariMenus[activeHero]; }
        const graphics::Menu</* Ikari or Item */ void *> &GetIkariMenu() const { return ikariMenus[activeHero]; }
        graphics::Menu<const common::Item *> &GetItemMenu() { return itemMenu; }
@@ -121,6 +122,7 @@ public:
        void RenderHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
 
 private:
+       void LoadSpellMenu(std::vector<Hero>::size_type heroIndex);
        void LoadInventory();
 
 private:
@@ -135,7 +137,7 @@ private:
        std::vector<geometry::Point<int> > heroesPositions;
        std::vector<Monster> monsters;
        std::vector<Hero> heroes;
-       std::vector<graphics::Menu</* Spell */ void *> > spellMenus;
+       std::vector<graphics::Menu<const common::Spell *> > spellMenus;
        graphics::Menu<const common::Item *> itemMenu;
        std::vector<graphics::Menu</* Ikari or Item */ void *> > ikariMenus;
        HeroTag heroTags[4];