]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
split battle state into (so far) 2 states
[l2e.git] / src / battle / BattleState.h
index daf1cae65f10c0f4c85267cdfc34bf39368360a1..a3c0879cedbbace7352a0ad547a090e9be8e41ae 100644 (file)
@@ -55,13 +55,24 @@ public:
        virtual void UpdateWorld(float deltaT);
        virtual void Render(SDL_Surface *);
 
-private:
+public:
+       AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; }
+       MoveMenu &GetMoveMenu() { return moveMenu; }
+
+public:
+       geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
+               return geometry::Vector<int>(
+                               (screen->w - background->w) / 2,
+                               (screen->h - background->h) / 2);
+       }
+       int BackgroundWidth() const { return background->w; }
+       int BackgroundHeight() const { return background->h; }
+
        void RenderBackground(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderMonsters(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderHeroes(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderAttackTypeMenu(SDL_Surface *screen, const geometry::Vector<int> &offset);
-       void RenderMoveMenu(SDL_Surface *screen, const geometry::Vector<int> &offset);
 
 private:
        SDL_Surface *background;