]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SwapHeroes.h
a5f5c62379399043f0148988068c52439e0ff392
[l2e.git] / src / battle / states / SwapHeroes.h
1 /*
2  * SwapHeroes.h
3  *
4  *  Created on: Aug 10, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_SWAPHEROES_H_
9 #define BATTLE_SWAPHEROES_H_
10
11 #include "../fwd.h"
12 #include "../../app/State.h"
13 #include "../../geometry/Vector.h"
14
15 namespace battle {
16
17 class SwapHeroes
18 : public app::State {
19
20 public:
21         SwapHeroes(BattleState *battle, SelectMoveAction *parent)
22         : ctrl(0), battle(battle), parent(parent), cursor(0), selected(-1), flipFlop(true) { }
23
24 public:
25         virtual void HandleEvents(const app::Input &);
26         virtual void UpdateWorld(float deltaT);
27         virtual void Render(SDL_Surface *);
28
29 private:
30         virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
31         virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
32         virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
33         virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
34
35         virtual void OnResize(int width, int height);
36
37 private:
38         void MoveUp();
39         void MoveRight();
40         void MoveDown();
41         void MoveLeft();
42
43 private:
44         void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
45
46 private:
47         app::Application *ctrl;
48         BattleState *battle;
49         SelectMoveAction *parent;
50         int cursor;
51         int selected;
52         bool flipFlop;
53
54 };
55
56 }
57
58 #endif /* BATTLE_SWAPHEROES_H_ */