X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectMoveAction.cpp;h=c728db0e61c6bd51502329e2ba7a84026d0fa7c1;hb=2ef82e057748751f795c60dcf826a001516b5ca0;hp=54f0f297661f2654ef49ffb82ed463b07ec57c98;hpb=4d0a650b178d81387caa36953ed06cc5d6c28213;p=l2e.git diff --git a/src/battle/states/SelectMoveAction.cpp b/src/battle/states/SelectMoveAction.cpp index 54f0f29..c728db0 100644 --- a/src/battle/states/SelectMoveAction.cpp +++ b/src/battle/states/SelectMoveAction.cpp @@ -14,27 +14,36 @@ #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) { } -void SelectMoveAction::HandleInput(const app::Input &input) { +void SelectMoveAction::HandleInput(const Input &input) { if (input.IsDown(Input::PAD_UP)) { battle->GetMoveMenu().Select(MoveMenu::CHANGE); } else if (input.IsDown(Input::PAD_DOWN)) { @@ -74,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); }