diff options
Diffstat (limited to 'hslist.h')
-rw-r--r-- | hslist.h | 35 |
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 { | |||
32 | class GlobalHighscoreList : public HighscoreList { | 32 | class 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 | ||
96 | class 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 | |||
110 | class 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 | |||
119 | class 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 |