From f42c9936ca65695c097900ad3bdf24ef13d512c4 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 29 Aug 2013 12:44:18 -0400 Subject: Added ability to add highscores to global highscore list --- hslist.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'hslist.h') 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 { class GlobalHighscoreList : public HighscoreList { public: GlobalHighscoreList(); + GlobalHighscoreList(Highscore* h); SDL_Surface* render(); + bool didFail(); private: typedef HighscoreList super; @@ -91,4 +93,37 @@ class NewHighscoreState : public State { Highscore* h; }; +class SubmitHighscoreState : public State { + public: + SubmitHighscoreState(Highscore* h); + State* operator() (SDL_Window* window, SDL_Renderer* renderer); + + protected: + Highscore* h; + SDL_mutex* m; + GlobalHighscoreList* lhl; + + private: + static int SubmitHighscore(void* pParam); +}; + +class FailedSubmittingHighscoreState : public State { + public: + FailedSubmittingHighscoreState(Highscore* h); + State* operator() (SDL_Window* window, SDL_Renderer* renderer); + + private: + Highscore* h; +}; + +class SubmittedHighscoreState : public State { + public: + SubmittedHighscoreState(GlobalHighscoreList* lhl, Highscore* h); + State* operator() (SDL_Window* window, SDL_Renderer* renderer); + + private: + GlobalHighscoreList* lhl; + Highscore* h; +}; + #endif -- cgit 1.4.1