]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/SelectTarget.h
apply damage indicated by attack selection
[l2e.git] / src / battle / states / SelectTarget.h
1 /*
2  * SelectTarget.h
3  *
4  *  Created on: Aug 9, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_SELECTTARGET_H_
9 #define BATTLE_SELECTTARGET_H_
10
11 #include "../../app/State.h"
12
13 #include "../../geometry/Vector.h"
14
15 namespace graphics { class Sprite; }
16
17 namespace battle {
18
19 class BattleState;
20 class TargetSelection;
21 class SelectAttackType;
22
23 class SelectTarget
24 : public app::State {
25
26 public:
27         SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon)
28         : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { }
29
30 public:
31         virtual void EnterState(app::Application &ctrl, SDL_Surface *screen);
32         virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
33         virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
34         virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
35
36         virtual void Resize(int width, int height);
37
38         virtual void HandleEvents(const app::Input &);
39         virtual void UpdateWorld(float deltaT);
40         virtual void Render(SDL_Surface *);
41
42 private:
43         void RenderCursors(SDL_Surface *screen, const geometry::Vector<int> &offset);
44
45 private:
46         app::Application *ctrl;
47         BattleState *battle;
48         SelectAttackType *parent;
49         TargetSelection *selection;
50         const graphics::Sprite *cursorIcon;
51         bool flipFlop;
52
53 };
54
55 }
56
57 #endif /* BATTLE_SELECTTARGET_H_ */