#include <vector>
struct CampaignProgress {
- float highscore;
+ int highscore;
float fasttime;
- float score;
+ int score;
float time;
std::vector<int> choices;
CampaignProgress() {
Account(FILE* tfile);
void endGame();
- void winCampaignLevel(int choice, float score, float time);
- void winLevel(int level, float score, float time);
+ void winCampaignLevel(int choice, int score, float time);
+ void winLevel(int level, int score, float time);
// getter and setters
int getDifficulty();
const std::string& getName() {
return name;
};
- float getCampaignScore() {
+ int getCampaignScore() {
return campaignProgress[currentCampaign].score;
};
int getCampaignChoicesMade() {
};
void setCampaignScore(int s) {
campaignProgress[currentCampaign].score = s;
- if (s > campaignProgress[currentCampaign].highscore)
+ if (s > campaignProgress[currentCampaign].highscore) {
campaignProgress[currentCampaign].highscore = s;
+ }
};
void setCampaignFinalTime(float t) {
campaignProgress[currentCampaign].time = t;
- if ((t < campaignProgress[currentCampaign].fasttime) || ((campaignProgress[currentCampaign].fasttime == 0) && (t != 0)))
+ if ((t < campaignProgress[currentCampaign].fasttime) || ((campaignProgress[currentCampaign].fasttime == 0) && (t != 0))) {
campaignProgress[currentCampaign].fasttime = t;
+ }
};
float getCampaignFasttime() {
return campaignProgress[currentCampaign].fasttime;
void resetFasttime() {
campaignProgress[currentCampaign].fasttime = 0;
};
- float getCampaignHighScore() {
+ int getCampaignHighScore() {
return campaignProgress[currentCampaign].highscore;
};
- float getHighScore(int i) {
+ int getHighScore(int i) {
return highscore[i];
};
float getFastTime(int i) {
int difficulty;
int progress; // progress in challenge levels
float points;
- float highscore[50];
+ int highscore[50];
float fasttime[50];
bool unlocked[60];
std::string name;