]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SelectMoveAction.h
extracted battle logic into a class
[l2e.git] / src / battle / states / SelectMoveAction.h
1 #ifndef BATTLE_SELECTMOVEACTION_H_
2 #define BATTLE_SELECTMOVEACTION_H_
3
4 namespace battle {
5         class Battle;
6         class BattleState;
7         class HeroTag;
8         struct Resources;
9 }
10
11 #include "../../app/State.h"
12 #include "../../math/Vector.h"
13
14 namespace battle {
15
16 class SelectMoveAction
17 : public app::State {
18
19 public:
20         SelectMoveAction(Battle *battle, BattleState *parent);
21
22 public:
23         virtual void HandleEvents(const app::Input &);
24         virtual void UpdateWorld(Uint32 deltaT);
25         virtual void Render(SDL_Surface *);
26
27 public:
28         const Resources &Res() const;
29         const math::Vector<int> &ScreenOffset() const;
30         const HeroTag &HeroTagAt(int index) const;
31         const math::Vector<int> &HeroTagPositionAt(int index) const;
32
33 private:
34         virtual void OnEnterState(SDL_Surface *screen);
35         virtual void OnExitState(SDL_Surface *screen);
36         virtual void OnResumeState(SDL_Surface *screen);
37         virtual void OnPauseState(SDL_Surface *screen);
38
39         virtual void OnResize(int width, int height);
40
41 private:
42         void RenderMenu(SDL_Surface *screen);
43
44 private:
45         Battle *battle;
46         BattleState *parent;
47         math::Vector<int> position;
48
49 };
50
51 }
52
53 #endif