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