]> git.localhorst.tv Git - l2e.git/blob - src/battle/states/VictoryState.h
relocate scripts
[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 namespace common {
9         class Upgrade;
10 }
11
12 #include "../../app/State.h"
13 #include "../../common/Hero.h"
14 #include "../../math/Vector.h"
15
16 #include <string>
17 #include <vector>
18
19 namespace battle {
20
21 class VictoryState
22 : public app::State {
23
24 public:
25         VictoryState(
26                         Battle *battle,
27                         BattleState *parent)
28         : battle(battle)
29         , parent(parent)
30         , cursor(0)
31         , stalling(false) { }
32
33 public:
34         virtual void HandleEvents(const app::Input &);
35         virtual void UpdateWorld(Uint32 deltaT);
36         virtual void Render(SDL_Surface *);
37
38 private:
39         virtual void OnEnterState(SDL_Surface *screen);
40         virtual void OnExitState(SDL_Surface *screen);
41         virtual void OnResumeState(SDL_Surface *screen);
42         virtual void OnPauseState(SDL_Surface *screen);
43
44         virtual void OnResize(int width, int height);
45
46 private:
47         void LoadResults();
48         void LoadResult(
49                         const common::Upgrade &,
50                         std::vector<std::string> &);
51         void RenderFrame(SDL_Surface *screen);
52         void RenderLines(SDL_Surface *screen);
53
54 private:
55         Battle *battle;
56         BattleState *parent;
57         app::Timer<Uint32> timer;
58         std::vector<std::string> lines;
59         math::Vector<int> framePosition;
60         math::Vector<int> frameSize;
61         math::Vector<int> textPosition;
62         int cursor;
63         bool stalling;
64
65 };
66
67 }
68
69 #endif