]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SwapHeroes.cpp
store an application handle in each state
[l2e.git] / src / battle / states / SwapHeroes.cpp
index 5c83f7403cbfee69c369f99c0a036f733f55157e..0dcd0bd4ea837bda9e30f340a6a9f947f00ad38c 100644 (file)
@@ -19,24 +19,24 @@ using std::vector;
 
 namespace battle {
 
-void SwapHeroes::EnterState(Application &c, SDL_Surface *screen) {
-       ctrl = &c;
+void SwapHeroes::OnEnterState(Application &c, SDL_Surface *screen) {
+
 }
 
-void SwapHeroes::ExitState(Application &c, SDL_Surface *screen) {
-       ctrl = 0;
+void SwapHeroes::OnExitState(Application &c, SDL_Surface *screen) {
+
 }
 
-void SwapHeroes::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnResumeState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
-void SwapHeroes::PauseState(Application &ctrl, SDL_Surface *screen) {
+void SwapHeroes::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
 
-void SwapHeroes::Resize(int width, int height) {
+void SwapHeroes::OnResize(int width, int height) {
 
 }
 
@@ -54,7 +54,7 @@ void SwapHeroes::HandleEvents(const Input &input) {
                if (cursor == selected) {
                        selected = -1;
                } else {
-                       ctrl->PopState();
+                       Ctrl().PopState();
                }
        }