summary refs log tree commit diff stats
path: root/hslist.h
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2013-08-29 12:44:18 -0400
committerStarla Insigna <starla4444@gmail.com>2013-08-29 12:44:18 -0400
commitf42c9936ca65695c097900ad3bdf24ef13d512c4 (patch)
tree77e5006c595883c1bb050683a611b4fb73c13c39 /hslist.h
parent19a20b3c0bb1ff4230b2f3504bd5ed8e43ffab3c (diff)
downloadmazeoflife-f42c9936ca65695c097900ad3bdf24ef13d512c4.tar.gz
mazeoflife-f42c9936ca65695c097900ad3bdf24ef13d512c4.tar.bz2
mazeoflife-f42c9936ca65695c097900ad3bdf24ef13d512c4.zip
Added ability to add highscores to global highscore list
Diffstat (limited to 'hslist.h')
-rw-r--r--hslist.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/hslist.h b/hslist.h index 8d450af..844bf37 100644 --- a/hslist.h +++ b/hslist.h
@@ -32,7 +32,9 @@ class LocalHighscoreList : public HighscoreList {
32class GlobalHighscoreList : public HighscoreList { 32class GlobalHighscoreList : public HighscoreList {
33 public: 33 public:
34 GlobalHighscoreList(); 34 GlobalHighscoreList();
35 GlobalHighscoreList(Highscore* h);
35 SDL_Surface* render(); 36 SDL_Surface* render();
37 bool didFail();
36 38
37 private: 39 private:
38 typedef HighscoreList super; 40 typedef HighscoreList super;
@@ -91,4 +93,37 @@ class NewHighscoreState : public State {
91 Highscore* h; 93 Highscore* h;
92}; 94};
93 95
96class SubmitHighscoreState : public State {
97 public:
98 SubmitHighscoreState(Highscore* h);
99 State* operator() (SDL_Window* window, SDL_Renderer* renderer);
100
101 protected:
102 Highscore* h;
103 SDL_mutex* m;
104 GlobalHighscoreList* lhl;
105
106 private:
107 static int SubmitHighscore(void* pParam);
108};
109
110class FailedSubmittingHighscoreState : public State {
111 public:
112 FailedSubmittingHighscoreState(Highscore* h);
113 State* operator() (SDL_Window* window, SDL_Renderer* renderer);
114
115 private:
116 Highscore* h;
117};
118
119class SubmittedHighscoreState : public State {
120 public:
121 SubmittedHighscoreState(GlobalHighscoreList* lhl, Highscore* h);
122 State* operator() (SDL_Window* window, SDL_Renderer* renderer);
123
124 private:
125 GlobalHighscoreList* lhl;
126 Highscore* h;
127};
128
94#endif 129#endif