]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/RunState.h
9a3a85608c47aa08d25d18e814189cd93e36b5f7
[l2e.git] / src / battle / states / RunState.h
1 /*
2  * RunState.h
3  *
4  *  Created on: Aug 10, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_RUNSTATE_H_
9 #define BATTLE_RUNSTATE_H_
10
11 namespace battle {
12         class BattleState;
13 }
14 namespace math {
15         template<class>
16         class Vector;
17 }
18
19 #include "../../app/State.h"
20
21 namespace battle {
22
23 class RunState
24 : public app::State {
25
26 public:
27         explicit RunState(BattleState *battle)
28         : battle(battle){ }
29
30 public:
31
32         virtual void HandleEvents(const app::Input &);
33         virtual void UpdateWorld(Uint32 deltaT);
34         virtual void Render(SDL_Surface *);
35
36 private:
37         virtual void OnEnterState(SDL_Surface *screen);
38         virtual void OnExitState(SDL_Surface *screen);
39         virtual void OnResumeState(SDL_Surface *screen);
40         virtual void OnPauseState(SDL_Surface *screen);
41
42         virtual void OnResize(int width, int height);
43
44 private:
45         void RenderTitleBar(SDL_Surface *screen, const math::Vector<int> &offset);
46
47 private:
48         BattleState *battle;
49         app::Timer<Uint32> timer;
50
51 };
52
53 }
54
55 #endif /* BATTLE_RUNSTATE_H_ */