]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SelectTarget.h
relocate scripts
[l2e.git] / src / battle / states / SelectTarget.h
1 #ifndef BATTLE_SELECTTARGET_H_
2 #define BATTLE_SELECTTARGET_H_
3
4 namespace battle {
5         class Battle;
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(Battle *battle,
25                         SelectAttackType *parent,
26                         TargetSelection *selection,
27                         const graphics::Sprite *cursorIcon);
28
29 public:
30         virtual void HandleEvents(const app::Input &);
31         virtual void UpdateWorld(Uint32 deltaT);
32         virtual void Render(SDL_Surface *);
33
34 private:
35         virtual void OnEnterState(SDL_Surface *screen);
36         virtual void OnExitState(SDL_Surface *screen);
37         virtual void OnResumeState(SDL_Surface *screen);
38         virtual void OnPauseState(SDL_Surface *screen);
39
40         virtual void OnResize(int width, int height);
41
42 private:
43         void RenderCursors(SDL_Surface *screen);
44
45 private:
46         Battle *battle;
47         SelectAttackType *parent;
48         TargetSelection *selection;
49         const graphics::Sprite *cursorIcon;
50         std::vector<math::Vector<int> > monsterPositions;
51         std::vector<math::Vector<int> > heroPositions;
52         math::Vector<int> cursorOffset;
53         math::Vector<int> indicatorOffset;
54         bool flipFlop;
55
56 };
57
58 }
59
60 #endif