X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAccount.h;h=8e435025e3d6f04b1bd88c7a5ab5d2771c953915;hb=8a32dc9e4e1011b10f009e999d7d008aa2711d8a;hp=b9d24832b1f8e0579490026804d74a5695ce11e9;hpb=5509b55dbc13227bdc7b97f2934fa71dad02cc66;p=lugaru.git diff --git a/Source/Account.h b/Source/Account.h index b9d2483..8e43502 100644 --- a/Source/Account.h +++ b/Source/Account.h @@ -43,14 +43,16 @@ struct CampaignProgress { class Account { public: - static void destroy(int i); - static Account* destroy(Account* a); - static Account* add(const std::string& name); + static void destroyActive(); + static void setActive(int i); + static void add(const std::string& name); static Account* get(int i); - static Account* loadFile(std::string filename); - static void saveFile(std::string filename, Account* accountactive); + static void loadFile(std::string filename); + static void saveFile(std::string filename); static int indice(Account* a); + static Account* active; + void endGame(); void winCampaignLevel(int choice, float score, float time); void winLevel(int level, float score, float time); @@ -60,8 +62,8 @@ public: void setDifficulty(int i) { difficulty = i; }; - const char* getName() { - return name.c_str(); + const std::string& getName() { + return name; }; float getCampaignScore() { return campaignProgress[currentCampaign].score;