]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SwapHeroes.h
cached some of the battle coordinates
[l2e.git] / src / battle / states / SwapHeroes.h
index a5f5c62379399043f0148988068c52439e0ff392..1f98772a1952e208844c422c38f6d5c0761ed457 100644 (file)
@@ -1,16 +1,15 @@
-/*
- * SwapHeroes.h
- *
- *  Created on: Aug 10, 2012
- *      Author: holy
- */
-
 #ifndef BATTLE_SWAPHEROES_H_
 #define BATTLE_SWAPHEROES_H_
 
-#include "../fwd.h"
+namespace battle {
+       class BattleState;
+       class SelectMoveAction;
+}
+
 #include "../../app/State.h"
-#include "../../geometry/Vector.h"
+#include "../../math/Vector.h"
+
+#include <vector>
 
 namespace battle {
 
@@ -19,18 +18,18 @@ class SwapHeroes
 
 public:
        SwapHeroes(BattleState *battle, SelectMoveAction *parent)
-       : ctrl(0), battle(battle), parent(parent), cursor(0), selected(-1), flipFlop(true) { }
+       : battle(battle), parent(parent), cursor(0), selected(-1), flipFlop(true) { }
 
 public:
        virtual void HandleEvents(const app::Input &);
-       virtual void UpdateWorld(float deltaT);
+       virtual void UpdateWorld(Uint32 deltaT);
        virtual void Render(SDL_Surface *);
 
 private:
-       virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
-       virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
 
        virtual void OnResize(int width, int height);
 
@@ -41,12 +40,14 @@ private:
        void MoveLeft();
 
 private:
-       void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
+       void RenderCursors(SDL_Surface *screen);
 
 private:
-       app::Application *ctrl;
        BattleState *battle;
        SelectMoveAction *parent;
+       std::vector<math::Vector<int> > positions;
+       math::Vector<int> cursorOffset;
+       math::Vector<int> indicatorOffset;
        int cursor;
        int selected;
        bool flipFlop;
@@ -55,4 +56,4 @@ private:
 
 }
 
-#endif /* BATTLE_SWAPHEROES_H_ */
+#endif