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