]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/RunState.cpp
merged Point into Vector
[l2e.git] / src / battle / states / RunState.cpp
index 1a90e280f5f9af70c10478a22470fa9df0ddc825..a22f43816a0006612066ba5ad290df8fd070548d 100644 (file)
@@ -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 {
@@ -70,10 +68,10 @@ 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, Point<int>(offset.X(), offset.Y()), battle->BackgroundWidth(), height);
+       battle->Res().titleFrame->Draw(screen, Vector<int>(offset.X(), offset.Y()), battle->Width(), height);
 
-       Point<int> textPosition(
-                       (battle->BackgroundWidth() - (std::strlen(battle->Res().escapeText) * battle->Res().titleFont->CharWidth())) / 2,
+       Vector<int> 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);
 }