2 Copyright (C) 2003, 2010 - Wolfire Games
3 Copyright (C) 2010 - MCMic
5 This file is part of Lugaru.
7 Lugaru is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 See the GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 static void destroy(int i);
34 static Account* destroy(Account* a);
35 static Account* add(std::string name);
36 static Account* get(int i);
37 static Account* loadFile(std::string filename);
38 static void saveFile(std::string filename, Account* accountactive);
39 static int indice(Account* a);
42 void winCampaignLevel(int choice, float score, float time);
43 void winLevel(int level, float score, float time);
47 void setDifficulty(int i) { difficulty = i; };
48 const char* getName() { return name.c_str(); };
49 float getCampaignScore() { return campaignscore; };
50 int getCampaignChoicesMade() { return campaignchoicesmade; };
51 int getCampaignChoice(int i) { return campaignchoices[i]; };
52 void setCampaignScore(int s) {
54 if(s>campaignhighscore)
57 void setCampaignFinalTime(float t) {
59 if((t<campaignfasttime) || (campaignfasttime==0) && (t!=0))
62 float getCampaignFasttime() { return campaignfasttime; };
63 void resetFasttime() { campaignfasttime = 0; };
64 float getCampaignHighScore() { return campaignhighscore; };
65 float getHighScore(int i) { return highscore[i]; };
66 float getFastTime(int i) { return fasttime[i]; };
67 int getProgress() { return progress; };
69 static int getNbAccounts() { return accounts.size(); };
71 Account(std::string n="");
79 float campaignhighscore;
80 float campaignfasttime;
83 int campaignchoicesmade;
84 int campaignchoices[5000]; // should really disappear. I'd use a vector or something like that.
87 static std::vector<Account*> accounts;