]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectSpell.cpp
switched some (x,y) and (w,h) pairs to vectors
[l2e.git] / src / battle / states / SelectSpell.cpp
index 1bc195c12223e2a7d00b95f642da72ef3a15f19c..0c1dec4e0dd47ab47180119b679a722fc7047c1d 100644 (file)
 #include "../../app/Application.h"
 #include "../../app/Input.h"
 #include "../../common/Spell.h"
-#include "../../geometry/operators.h"
-#include "../../geometry/Point.h"
 #include "../../graphics/Frame.h"
 
 using app::Application;
 using app::Input;
 using common::Spell;
-using geometry::Point;
 using geometry::Vector;
 using graphics::Frame;
 
@@ -111,7 +108,7 @@ void SelectSpell::Render(SDL_Surface *screen) {
 
 void SelectSpell::RenderFrame(SDL_Surface *screen, const Vector<int> &offset) {
        const Frame *frame(battle->Res().selectFrame);
-       Point<int> position(frame->BorderWidth(), frame->BorderHeight());
+       Vector<int> position(frame->BorderSize());
        int width(battle->Width() - 2 * frame->BorderWidth());
        int height(battle->Res().normalFont->CharHeight() * 13);
        frame->Draw(screen, position + offset, width, height);
@@ -119,7 +116,7 @@ void SelectSpell::RenderFrame(SDL_Surface *screen, const Vector<int> &offset) {
 
 void SelectSpell::RenderHeadline(SDL_Surface *screen, const Vector<int> &offset) {
        const Resources &res(battle->Res());
-       Point<int> position(
+       Vector<int> position(
                        2 * res.selectFrame->BorderWidth() + res.normalFont->CharWidth(),
                        2 * res.selectFrame->BorderHeight());
        res.normalFont->DrawString(res.spellMenuHeadline, screen, position + offset);
@@ -127,7 +124,7 @@ void SelectSpell::RenderHeadline(SDL_Surface *screen, const Vector<int> &offset)
 
 void SelectSpell::RenderMenu(SDL_Surface *screen, const Vector<int> &offset) {
        const Resources &res(battle->Res());
-       Point<int> position(
+       Vector<int> position(
                        2 * res.selectFrame->BorderWidth() + res.normalFont->CharWidth(),
                        2 * res.selectFrame->BorderHeight() + 2 * res.normalFont->CharHeight());
        battle->ActiveHero().SpellMenu().Draw(screen, position + offset);