void LoadCampaign()
{
- if (!accountactive)
+ if (!Account::active)
return;
- std::ifstream ipstream(Folders::getResourcePath("Campaigns/" + accountactive->getCurrentCampaign() + ".txt"));
+ std::ifstream ipstream(Folders::getResourcePath("Campaigns/" + Account::active->getCurrentCampaign() + ".txt"));
if (!ipstream.good()) {
- if (accountactive->getCurrentCampaign() == "main") {
+ if (Account::active->getCurrentCampaign() == "main") {
cerr << "Could not found main campaign!" << endl;
return;
}
- cerr << "Could not found campaign \"" << accountactive->getCurrentCampaign() << "\", falling back to main." << endl;
- accountactive->setCurrentCampaign("main");
+ cerr << "Could not found campaign \"" << Account::active->getCurrentCampaign() << "\", falling back to main." << endl;
+ Account::active->setCurrentCampaign("main");
return LoadCampaign();
}
ipstream.ignore(256, ':');
}
ipstream.close();
- std::ifstream test(Folders::getResourcePath("Textures/" + accountactive->getCurrentCampaign() + "/World.png"));
+ std::ifstream test(Folders::getResourcePath("Textures/" + Account::active->getCurrentCampaign() + "/World.png"));
if (test.good()) {
- Mainmenuitems[7].load("Textures/" + accountactive->getCurrentCampaign() + "/World.png", 0);
+ Mainmenuitems[7].load("Textures/" + Account::active->getCurrentCampaign() + "/World.png", 0);
} else {
Mainmenuitems[7].load("Textures/World.png", 0);
}
- if (accountactive->getCampaignChoicesMade() == 0) {
- accountactive->setCampaignScore(0);
- accountactive->resetFasttime();
+ if (Account::active->getCampaignChoicesMade() == 0) {
+ Account::active->setCampaignScore(0);
+ Account::active->resetFasttime();
}
}