]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/VictoryState.h
bb872a2774adf314370bca421dbbd8810a1eb2e5
[l2e.git] / src / battle / states / VictoryState.h
1 #ifndef BATTLE_VICTORYSTATE_H_
2 #define BATTLE_VICTORYSTATE_H_
3
4 namespace battle {
5         class Battle;
6         class BattleState;
7 }
8
9 #include "../../app/State.h"
10 #include "../../math/Vector.h"
11
12 #include <string>
13 #include <vector>
14
15 namespace battle {
16
17 class VictoryState
18 : public app::State {
19
20 public:
21         VictoryState(
22                         Battle *battle,
23                         BattleState *parent)
24         : battle(battle)
25         , parent(parent) { }
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 LoadResults();
42         void RenderFrame(SDL_Surface *screen);
43         void RenderLines(SDL_Surface *screen);
44
45 private:
46         Battle *battle;
47         BattleState *parent;
48         app::Timer<Uint32> timer;
49         std::vector<std::string> lines;
50         math::Vector<int> framePosition;
51         math::Vector<int> frameSize;
52         math::Vector<int> textPosition;
53
54 };
55
56 }
57
58 #endif