X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAccount.h;h=7d550e81e7534597a6f0161a349aa1739a0fe187;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=388c064fcc6c2b6063614aeb95b927737beee55f;hpb=a2c433c31cd6ee454ace7f582375c6002dfba732;p=lugaru.git diff --git a/Source/Account.h b/Source/Account.h index 388c064..7d550e8 100644 --- a/Source/Account.h +++ b/Source/Account.h @@ -28,13 +28,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -typedef struct { +struct CampaignProgress { float highscore; float fasttime; float score; float time; std::vector choices; -} campaign_progress_t; + CampaignProgress() { + highscore = 0; + fasttime = 0; + score = 0; + time = 0; + } +}; class Account { public: @@ -73,6 +79,7 @@ class Account { float getHighScore(int i) { return highscore[i]; }; float getFastTime(int i) { return fasttime[i]; }; int getProgress() { return progress; }; + std::string getCurrentCampaign() { return currentCampaign; }; void setCurrentCampaign(std::string name); static int getNbAccounts() { return accounts.size(); }; @@ -87,7 +94,7 @@ class Account { std::string name; std::string currentCampaign; - std::map campaignProgress; + std::map campaignProgress; //statics static std::vector accounts;