X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectTarget.cpp;h=e8572884cf2648c366403385e44c7824da413fa2;hb=2a1d9169e1f6c2dfe0f93ed40d5fb68d3da342af;hp=37f2da9829d603405b1b546aa446659e239582a5;hpb=fde7b27297882a7f033641df92e732abd137b532;p=l2e.git diff --git a/src/battle/states/SelectTarget.cpp b/src/battle/states/SelectTarget.cpp index 37f2da9..e857288 100644 --- a/src/battle/states/SelectTarget.cpp +++ b/src/battle/states/SelectTarget.cpp @@ -11,12 +11,9 @@ #include "../BattleState.h" #include "../../app/Application.h" #include "../../app/Input.h" -#include "../../geometry/operators.h" -#include "../../geometry/Point.h" using app::Application; using app::Input; -using geometry::Point; using geometry::Vector; using std::vector; @@ -89,11 +86,10 @@ void SelectTarget::Render(SDL_Surface *screen) { } void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector &offset) { - // TODO: this should be related to the enemy's width Vector cursorOffset(cursorIcon->Width() / -2, cursorIcon->Height()); // offset the indicator by 1/8th to the right and top Vector indicatorOffset(cursorOffset + Vector(cursorIcon->Width() / 8, cursorIcon->Height() / -8)); - vector > positions; + vector > positions; if (selection->TargetsMonsters()) { for (int i(0), end(battle->MaxMonsters()); i < end; ++i) { positions.push_back(battle->MonsterAt(i).Position()); @@ -104,7 +100,7 @@ void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector >::size_type i(0); i < positions.size(); ++i) { + for (vector >::size_type i(0); i < positions.size(); ++i) { if (selection->IsSelected(i)) { cursorIcon->DrawTopRight(screen, positions[i] + indicatorOffset + offset); }