X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FCampaign.cpp;h=b02dd7bf58a66542ee193a5c16cc14fbfd7dfb76;hb=3de67c0db8c3c74f5fb487579936a07770d253a1;hp=f46b7d299b4c7a90e7cf92a77f3ad4a9662e27ab;hpb=3455f3a84eef6a73f39a4267da445c7998c3515e;p=lugaru.git diff --git a/Source/Campaign.cpp b/Source/Campaign.cpp index f46b7d2..b02dd7b 100644 --- a/Source/Campaign.cpp +++ b/Source/Campaign.cpp @@ -55,16 +55,16 @@ std::vector ListCampaigns() 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, ':'); @@ -78,16 +78,16 @@ void LoadCampaign() } 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(); } }