]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectMoveAction.cpp
reworked Application's state stack
[l2e.git] / src / battle / states / SelectMoveAction.cpp
index 4a19d48a00643e74f82b1d97a0616d8d9cc7d638..bee880be88c418135939da8a01c0ee9336eaa792 100644 (file)
 #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