X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectMoveAction.cpp;h=5631e69856f166b930cb1fb7023eb97987ff2e97;hb=7b2600e51a05efe1c102389a25b8123f30a972b0;hp=4a19d48a00643e74f82b1d97a0616d8d9cc7d638;hpb=558fd3d14ad1a9dc347998691a0b300fd334a16a;p=l2e.git diff --git a/src/battle/states/SelectMoveAction.cpp b/src/battle/states/SelectMoveAction.cpp index 4a19d48..5631e69 100644 --- a/src/battle/states/SelectMoveAction.cpp +++ b/src/battle/states/SelectMoveAction.cpp @@ -14,20 +14,29 @@ #include "../../app/Input.h" #include "../../geometry/operators.h" +using app::Application; using app::Input; using geometry::Point; using geometry::Vector; namespace battle { -void SelectMoveAction::EnterState(app::Application &c, SDL_Surface *screen) { +void SelectMoveAction::EnterState(Application &c, SDL_Surface *screen) { ctrl = &c; } -void SelectMoveAction::ExitState() { +void SelectMoveAction::ExitState(Application &c, SDL_Surface *screen) { ctrl = 0; } +void SelectMoveAction::ResumeState(Application &ctrl, SDL_Surface *screen) { + +} + +void SelectMoveAction::PauseState(Application &ctrl, SDL_Surface *screen) { + +} + void SelectMoveAction::Resize(int width, int height) { @@ -47,6 +56,7 @@ void SelectMoveAction::HandleInput(const app::Input &input) { switch (battle->GetMoveMenu().Selected()) { case MoveMenu::ATTACK: ctrl->ChangeState(new SelectAttackType(battle)); + battle->NextHero(); break; case MoveMenu::CHANGE: // TODO: switch to change state @@ -73,7 +83,7 @@ void SelectMoveAction::Render(SDL_Surface *screen) { void SelectMoveAction::RenderMenu(SDL_Surface *screen, const Vector &offset) { Point position( (battle->BackgroundWidth() - battle->GetMoveMenu().Width()) / 2, - (battle->BackgroundHeight() * 3 / 4) - (battle->GetMoveMenu().Height() / 2)); + battle->BackgroundHeight() - battle->GetMoveMenu().Height() - battle->GetMoveMenu().Height() / 2); battle->GetMoveMenu().Render(screen, position + offset); }