#include "../../app/Application.h"
#include "../../app/Input.h"
#include "../../common/Item.h"
-#include "../../geometry/operators.h"
#include <stdexcept>
using app::Application;
using app::Input;
using common::Item;
-using geometry::Point;
using geometry::Vector;
namespace battle {
ctrl->PushState(new SelectTarget(battle, this, &ac.Selection(), battle->Res().weaponTargetCursor));
break;
case AttackChoice::MAGIC:
- // TODO: detect single/multiple/all attack mode
if (battle->ActiveHero().CanUseMagic()) {
ctrl->PushState(new SelectSpell(battle, this));
}
if (battle->BeforeFirstHero()) {
ctrl->ChangeState(new SelectMoveAction(battle));
} else {
- ac.Reset();
+ battle->ActiveHero().GetAttackChoice().Reset();
}
}
}
void SelectAttackType::RenderMenu(SDL_Surface *screen, const Vector<int> &offset) {
- Point<int> position(
+ Vector<int> position(
(battle->Width() - battle->GetAttackTypeMenu().Width()) / 2,
battle->Height() - battle->GetAttackTypeMenu().Height() - battle->GetAttackTypeMenu().Height() / 2);
battle->GetAttackTypeMenu().Render(screen, position + offset);