]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/RunState.cpp
wrapped some virtual State methods in non-virtual calls
[l2e.git] / src / battle / states / RunState.cpp
index a22f43816a0006612066ba5ad290df8fd070548d..dbf38680d55671ab69ba6057e5bc23eaab0e0398 100644 (file)
@@ -22,25 +22,24 @@ using geometry::Vector;
 
 namespace battle {
 
-void RunState::EnterState(Application &c, SDL_Surface *screen) {
+void RunState::OnEnterState(Application &c, SDL_Surface *screen) {
        ctrl = &c;
-       // TODO: push battle animation if enemy is faster
 }
 
-void RunState::ExitState(Application &c, SDL_Surface *screen) {
+void RunState::OnExitState(Application &c, SDL_Surface *screen) {
        ctrl = 0;
 }
 
-void RunState::ResumeState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
        timer = GraphicsTimers().StartCountdown(2500);
 }
 
-void RunState::PauseState(Application &ctrl, SDL_Surface *screen) {
+void RunState::OnPauseState(Application &ctrl, SDL_Surface *screen) {
 
 }
 
 
-void RunState::Resize(int width, int height) {
+void RunState::OnResize(int width, int height) {
 
 }
 
@@ -68,7 +67,7 @@ void RunState::Render(SDL_Surface *screen) {
 
 void RunState::RenderTitleBar(SDL_Surface *screen, const Vector<int> &offset) {
        int height(battle->Res().titleFrame->BorderHeight() * 2 + battle->Res().titleFont->CharHeight());
-       battle->Res().titleFrame->Draw(screen, Vector<int>(offset.X(), offset.Y()), battle->Width(), height);
+       battle->Res().titleFrame->Draw(screen, offset, battle->Width(), height);
 
        Vector<int> textPosition(
                        (battle->Width() - (std::strlen(battle->Res().escapeText) * battle->Res().titleFont->CharWidth())) / 2,