X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectAttackType.cpp;h=fbd43336769f1c3d570c3e867d948b1340accc3c;hb=520af5a8ef4fdfd4156377d4fccd93eecd450f0f;hp=3157ca7642981a9c822ea2adc0093005684e9f2b;hpb=19f0f64186c38fab38fe802bc1b797b1418d573a;p=l2e.git diff --git a/src/battle/states/SelectAttackType.cpp b/src/battle/states/SelectAttackType.cpp index 3157ca7..fbd4333 100644 --- a/src/battle/states/SelectAttackType.cpp +++ b/src/battle/states/SelectAttackType.cpp @@ -17,14 +17,12 @@ #include "../../app/Application.h" #include "../../app/Input.h" #include "../../common/Item.h" -#include "../../geometry/operators.h" #include using app::Application; using app::Input; using common::Item; -using geometry::Point; using geometry::Vector; namespace battle { @@ -114,7 +112,7 @@ void SelectAttackType::HandleEvents(const Input &input) { if (battle->BeforeFirstHero()) { ctrl->ChangeState(new SelectMoveAction(battle)); } else { - ac.Reset(); + battle->ActiveHero().GetAttackChoice().Reset(); } } @@ -136,7 +134,7 @@ void SelectAttackType::Render(SDL_Surface *screen) { } void SelectAttackType::RenderMenu(SDL_Surface *screen, const Vector &offset) { - Point position( + Vector position( (battle->Width() - battle->GetAttackTypeMenu().Width()) / 2, battle->Height() - battle->GetAttackTypeMenu().Height() - battle->GetAttackTypeMenu().Height() / 2); battle->GetAttackTypeMenu().Render(screen, position + offset);