]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
made application and battle state resizable
[l2e.git] / src / battle / BattleState.h
index ccc242512bf87ddbecf25e0656f86d7cb0e1a8fa..52238ebe5d3594b964cd656aa10bd5094e793e51 100644 (file)
@@ -25,7 +25,9 @@ class BattleState
 public:
        BattleState(SDL_Surface *background, const PartyLayout &monstersLayout)
        : background(background)
-       , monstersLayout(&monstersLayout) { }
+       , monstersLayout(&monstersLayout)
+       , width(0)
+       , height(0) { }
 
 public:
        void AddMonster(const Monster &);
@@ -34,6 +36,8 @@ public:
        virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
        virtual void ExitState();
 
+       virtual void Resize(int width, int height);
+
        virtual void HandleEvent(const SDL_Event &);
        virtual void UpdateWorld(float deltaT);
        virtual void Render(SDL_Surface *);
@@ -43,6 +47,8 @@ private:
        const PartyLayout *monstersLayout;
        std::vector<geometry::Point<int> > monsterPositions;
        std::vector<Monster> monsters;
+       int width;
+       int height;
 
 };