]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectTarget.h
store an application handle in each state
[l2e.git] / src / battle / states / SelectTarget.h
index 2f1f38403d19696d789a7d330e6554a7dc796ff5..01ebba72315dffee10258c84b8daabcf59f0e747 100644 (file)
@@ -20,9 +20,14 @@ class SelectTarget
 
 public:
        SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon)
-       : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
+       : battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
 
 public:
+       virtual void HandleEvents(const app::Input &);
+       virtual void UpdateWorld(float 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);
@@ -30,15 +35,10 @@ public:
 
        virtual void OnResize(int width, int height);
 
-       virtual void HandleEvents(const app::Input &);
-       virtual void UpdateWorld(float deltaT);
-       virtual void Render(SDL_Surface *);
-
 private:
        void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
 
 private:
-       app::Application *ctrl;
        BattleState *battle;
        SelectAttackType *parent;
        TargetSelection *selection;