]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SwapHeroes.h
added melee animation of monsters
[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 "../../app/State.h"
12
13 #include "../../geometry/Vector.h"
14
15 namespace battle {
16
17 class BattleState;
18 class SelectMoveAction;
19
20 class SwapHeroes
21 : public app::State {
22
23 public:
24         SwapHeroes(BattleState *battle, SelectMoveAction *parent)
25         : ctrl(0), battle(battle), parent(parent), cursor(0), selected(-1), flipFlop(true) { }
26
27 public:
28         virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
29         virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
30         virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
31         virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
32
33         virtual void Resize(int width, int height);
34
35         virtual void HandleEvents(const app::Input &);
36         virtual void UpdateWorld(float deltaT);
37         virtual void Render(SDL_Surface *);
38
39 private:
40         void MoveUp();
41         void MoveRight();
42         void MoveDown();
43         void MoveLeft();
44
45 private:
46         void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
47
48 private:
49         app::Application *ctrl;
50         BattleState *battle;
51         SelectMoveAction *parent;
52         int cursor;
53         int selected;
54         bool flipFlop;
55
56 };
57
58 }
59
60 #endif /* BATTLE_SWAPHEROES_H_ */