X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAccount.h;h=385c6fa5fb42aea59e9015a82a691c8518be53b5;hb=bdabd9d4a53be2fa9d90f900f7e5949d2f0ef75c;hp=dcaba951469fc03afdbacd556d1792775b31a8a1;hpb=f83c7bc4ef12b0bbdc1cfa6bdce35d9665510e6c;p=lugaru.git diff --git a/Source/Account.h b/Source/Account.h index dcaba95..385c6fa 100644 --- a/Source/Account.h +++ b/Source/Account.h @@ -46,7 +46,7 @@ public: static void destroyActive(); static void setActive(int i); static void add(const std::string& name); - static Account* get(int i); + static Account& get(int i); static void loadFile(std::string filename); static void saveFile(std::string filename); static int getNbAccounts(); @@ -54,6 +54,9 @@ public: static bool hasActive(); static Account& active(); + Account(const std::string& name = ""); + Account(FILE* tfile); + void endGame(); void winCampaignLevel(int choice, float score, float time); void winLevel(int level, float score, float time); @@ -110,10 +113,11 @@ public: private: //statics - static std::vector accounts; + static std::vector accounts; static int i_active; - Account(const std::string& name = ""); + void save(FILE* tfile); + int difficulty; int progress; // progress in challenge levels float points;