X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=96a7ce20643d5b62f4aee3d3c9f0f68103280a3a;hb=7946f704a4cd3a985d2fb523079fce7fa14c341e;hp=484e4529c6a49d7d78776b3de9420f286a96bcdf;hpb=b6502719f0f02bdb4fc39aa66fa4a369ea583036;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index 484e452..96a7ce2 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -18,11 +18,16 @@ #include "../app/State.h" #include "../geometry/Point.h" #include "../geometry/Vector.h" +#include "../graphics/Menu.h" #include #include namespace app { class Input; } +namespace common { + class Inventory; + class Item; +} namespace graphics { class Font; class Frame; @@ -77,6 +82,12 @@ public: bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; } void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); } bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); } + graphics::Menu &GetSpellMenu() { return spellMenus[activeHero]; } + const graphics::Menu &GetSpellMenu() const { return spellMenus[activeHero]; } + graphics::Menu &GetIkariMenu() { return ikariMenus[activeHero]; } + const graphics::Menu &GetIkariMenu() const { return ikariMenus[activeHero]; } + graphics::Menu &GetItemMenu() { return itemMenu; } + const graphics::Menu &GetItemMenu() const { return itemMenu; } public: geometry::Vector CalculateScreenOffset(SDL_Surface *screen) const { @@ -92,6 +103,9 @@ public: void RenderHeroes(SDL_Surface *screen, const geometry::Vector &offset); void RenderHeroTags(SDL_Surface *screen, const geometry::Vector &offset); +private: + void LoadInventory(); + private: SDL_Surface *background; const PartyLayout *monstersLayout; @@ -103,6 +117,9 @@ private: std::vector > heroesPositions; std::vector monsters; std::vector heroes; + std::vector > spellMenus; + graphics::Menu itemMenu; + std::vector > ikariMenus; std::vector heroTags; std::vector attackChoices; int activeHero;