X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAccount.h;h=7d550e81e7534597a6f0161a349aa1739a0fe187;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=5acbe6a74b517e5dbffa002dd2504e366bf3a002;hpb=7a084f44a89054024b83299709c19a2f67fcaea9;p=lugaru.git diff --git a/Source/Account.h b/Source/Account.h index 5acbe6a..7d550e8 100644 --- a/Source/Account.h +++ b/Source/Account.h @@ -25,8 +25,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include #include +struct CampaignProgress { + float highscore; + float fasttime; + float score; + float time; + std::vector choices; + CampaignProgress() { + highscore = 0; + fasttime = 0; + score = 0; + time = 0; + } +}; class Account { public: @@ -46,42 +60,41 @@ class Account { int getDifficulty(); void setDifficulty(int i) { difficulty = i; }; const char* getName() { return name.c_str(); }; - float getCampaignScore() { return campaignscore; }; - int getCampaignChoicesMade() { return campaignchoicesmade; }; - int getCampaignChoice(int i) { return campaignchoices[i]; }; + float getCampaignScore() { return campaignProgress[currentCampaign].score; }; + int getCampaignChoicesMade() { return campaignProgress[currentCampaign].choices.size(); }; + int getCampaignChoice(int i) { return campaignProgress[currentCampaign].choices[i]; }; void setCampaignScore(int s) { - campaignscore=s; - if(s>campaignhighscore) - campaignhighscore=s; + campaignProgress[currentCampaign].score=s; + if(s>campaignProgress[currentCampaign].highscore) + campaignProgress[currentCampaign].highscore=s; }; void setCampaignFinalTime(float t) { - campaigntime = t; - if((t campaignProgress; //statics static std::vector accounts;