]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectItem.cpp
merged Point into Vector
[l2e.git] / src / battle / states / SelectItem.cpp
index bd09da664e204891b6a8b3aeeaf86b05e3b174db..f58a78eaf72fa9eb9c658d7f75b5af8ab3fbd395 100644 (file)
 #include "../../app/Application.h"
 #include "../../app/Input.h"
 #include "../../common/Item.h"
-#include "../../geometry/Point.h"
-#include "../../geometry/operators.h"
 #include "../../graphics/Frame.h"
 
 using app::Application;
 using app::Input;
 using common::Item;
-using geometry::Point;
 using geometry::Vector;
 using graphics::Frame;
 
@@ -61,7 +58,7 @@ void SelectItem::HandleEvents(const Input &input) {
                        if (item->GetTargetingMode().TargetsAlly()) {
                                ac.Selection().SelectHeroes();
                        } else {
-                               ac.Selection().SelectEnemies();
+                               ac.Selection().SelectMonsters();
                        }
                        if (item->GetTargetingMode().TargetsAll()) {
                                ac.SetType(AttackChoice::ITEM);
@@ -110,7 +107,7 @@ void SelectItem::Render(SDL_Surface *screen) {
 
 void SelectItem::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->BorderWidth(), frame->BorderHeight());
        int width(battle->Width() - 2 * frame->BorderWidth());
        int height(battle->Res().normalFont->CharHeight() * 13);
        frame->Draw(screen, position + offset, width, height);
@@ -118,7 +115,7 @@ void SelectItem::RenderFrame(SDL_Surface *screen, const Vector<int> &offset) {
 
 void SelectItem::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.itemMenuHeadline, screen, position + offset);
@@ -126,7 +123,7 @@ void SelectItem::RenderHeadline(SDL_Surface *screen, const Vector<int> &offset)
 
 void SelectItem::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->ItemMenu().Draw(screen, position + offset);