namespace common {
class Inventory;
class Item;
+ class Spell;
}
namespace graphics {
class Font;
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</* Ikari or Item */ void *> &GetIkariMenu() { return ikariMenus[activeHero]; }
- const graphics::Menu</* Ikari or Item */ void *> &GetIkariMenu() const { return ikariMenus[activeHero]; }
+ graphics::Menu<const common::Spell *> &GetSpellMenu() { return spellMenus[activeHero]; }
+ const graphics::Menu<const common::Spell *> &GetSpellMenu() const { return spellMenus[activeHero]; }
+ graphics::Menu<const common::Item *> &GetIkariMenu() { return ikariMenus[activeHero]; }
+ const graphics::Menu<const common::Item *> &GetIkariMenu() const { return ikariMenus[activeHero]; }
graphics::Menu<const common::Item *> &GetItemMenu() { return itemMenu; }
const graphics::Menu<const common::Item *> &GetItemMenu() const { return itemMenu; }
void RenderHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
private:
+ void LoadSpellMenu(std::vector<Hero>::size_type heroIndex);
void LoadInventory();
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;
+ std::vector<graphics::Menu<const common::Item *> > ikariMenus;
HeroTag heroTags[4];
geometry::Point<int> heroTagPositions[4];
AttackChoice attackChoices[4];