X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FRunState.cpp;h=c75255c3d1edf51e9cd461066fdfd0c7ea2885d9;hb=70641f2eb3f9fce8c89dcbf345e202050609a142;hp=155313f0f686e675979ad4775815d334a3cc2017;hpb=8f6a2452408f4ae35396cd7008a6fab0ecb03a46;p=l2e.git diff --git a/src/battle/states/RunState.cpp b/src/battle/states/RunState.cpp index 155313f..c75255c 100644 --- a/src/battle/states/RunState.cpp +++ b/src/battle/states/RunState.cpp @@ -10,8 +10,7 @@ #include "../BattleState.h" #include "../../app/Application.h" #include "../../app/Input.h" -#include "../../geometry/operators.h" -#include "../../geometry/Point.h" +#include "../../geometry/Vector.h" #include "../../graphics/Font.h" #include "../../graphics/Frame.h" @@ -19,14 +18,12 @@ using app::Application; using app::Input; -using geometry::Point; 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::ExitState(Application &c, SDL_Surface *screen) { @@ -70,9 +67,9 @@ void RunState::Render(SDL_Surface *screen) { void RunState::RenderTitleBar(SDL_Surface *screen, const Vector &offset) { int height(battle->Res().titleFrame->BorderHeight() * 2 + battle->Res().titleFont->CharHeight()); - battle->Res().titleFrame->Draw(screen, Point(offset.X(), offset.Y()), battle->Width(), height); + battle->Res().titleFrame->Draw(screen, offset, battle->Width(), height); - Point textPosition( + Vector textPosition( (battle->Width() - (std::strlen(battle->Res().escapeText) * battle->Res().titleFont->CharWidth())) / 2, battle->Res().titleFrame->BorderHeight()); battle->Res().titleFont->DrawString(battle->Res().escapeText, screen, textPosition + offset);