X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FRunState.cpp;h=7e7dfc49b5ceb04262287a8c04886d39cd9027ed;hb=4309d259becd96ead792678257e910c03a6b4a3d;hp=e1f6f4bcdd89058dc65b260849202e872606df54;hpb=d20fa78a0dcbc95a69bb6077d2081d42b74a2d1a;p=l2e.git diff --git a/src/battle/states/RunState.cpp b/src/battle/states/RunState.cpp index e1f6f4b..7e7dfc4 100644 --- a/src/battle/states/RunState.cpp +++ b/src/battle/states/RunState.cpp @@ -1,16 +1,9 @@ -/* - * RunState.cpp - * - * Created on: Aug 10, 2012 - * Author: holy - */ - #include "RunState.h" #include "../BattleState.h" #include "../../app/Application.h" #include "../../app/Input.h" -#include "../../geometry/Vector.h" +#include "../../math/Vector.h" #include "../../graphics/Font.h" #include "../../graphics/Frame.h" @@ -18,29 +11,28 @@ using app::Application; using app::Input; -using geometry::Vector; +using math::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,12 +40,12 @@ 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 } } -void RunState::UpdateWorld(float deltaT) { +void RunState::UpdateWorld(Uint32 deltaT) { }