]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/RunState.cpp
removed now superfluous Application parameter to State callbacks
[l2e.git] / src / battle / states / RunState.cpp
index e1f6f4bcdd89058dc65b260849202e872606df54..311e0f35c3cc8b8c7aba89350901da1c762a3e92 100644 (file)
@@ -22,25 +22,24 @@ using geometry::Vector;
 
 namespace battle {
 
-void RunState::EnterState(Application &c, SDL_Surface *screen) {
-       ctrl = &c;
-       // TODO: push battle animation if enemy is faster
+void RunState::OnEnterState(SDL_Surface *screen) {
+
 }
 
-void RunState::ExitState(Application &c, SDL_Surface *screen) {
-       ctrl = 0;
+void RunState::OnExitState(SDL_Surface *screen) {
+
 }
 
-void RunState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnResumeState(SDL_Surface *screen) {
        timer = GraphicsTimers().StartCountdown(2500);
 }
 
-void RunState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnPauseState(SDL_Surface *screen) {
 
 }
 
 
-void RunState::Resize(int width, int height) {
+void RunState::OnResize(int width, int height) {
 
 }
 
@@ -48,7 +47,7 @@ void RunState::Resize(int width, int height) {
 void RunState::HandleEvents(const Input &input) {
        if (timer.Finished()) {
                battle->SetRunaway();
-               ctrl->PopState(); // pop self
+               Ctrl().PopState(); // pop self
        }
 }