X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FRunState.cpp;h=e1f6f4bcdd89058dc65b260849202e872606df54;hb=d20fa78a0dcbc95a69bb6077d2081d42b74a2d1a;hp=6f4325a0b72d0f3850b334c83fe8fe321c771316;hpb=69123d71dacfdd6592c00ead8b92b6441d0f0228;p=l2e.git diff --git a/src/battle/states/RunState.cpp b/src/battle/states/RunState.cpp index 6f4325a..e1f6f4b 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,7 +18,6 @@ using app::Application; using app::Input; -using geometry::Point; using geometry::Vector; namespace battle { @@ -64,16 +62,16 @@ void RunState::Render(SDL_Surface *screen) { battle->RenderBackground(screen, offset); battle->RenderMonsters(screen, offset); battle->RenderHeroes(screen, offset); - // render small tags + battle->RenderSmallHeroTags(screen, offset); RenderTitleBar(screen, offset); } 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->BackgroundWidth(), height); + battle->Res().titleFrame->Draw(screen, offset, battle->Width(), height); - Point textPosition( - (battle->BackgroundWidth() - (std::strlen(battle->Res().escapeText) * battle->Res().titleFont->CharWidth())) / 2, + 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); }