X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=37a29f583de2c8f30d14c0faf36a1bca2b6c3029;hb=b84825978803615f45a9f128232e62431042aec0;hp=e738a420552cbc58067ce48f98f1a32bda426ba4;hpb=2b4a9af9f7693a7715ae77f491157baac7257b10;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index e738a42..37a29f5 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -35,17 +35,17 @@ along with Lugaru. If not, see . #include #include #include "Game.h" -#include "openal_wrapper.h" -#include "Settings.h" -#include "Input.h" #include "Animation/Animation.h" -#include "Awards.h" -#include "Menu.h" -#include "ConsoleCmds.h" -#include "Dialog.h" +#include "Audio/openal_wrapper.h" +#include "Devtools/ConsoleCmds.h" +#include "Level/Awards.h" +#include "Level/Campaign.h" +#include "Level/Dialog.h" +#include "Level/Hotspot.h" +#include "Menu/Menu.h" +#include "User/Settings.h" #include "Utils/Folders.h" -#include "Hotspot.h" -#include "Campaign.h" +#include "Utils/Input.h" #include #include @@ -692,8 +692,9 @@ void Game::Loadlevel(const std::string& name) damagedealt = 0; damagetaken = 0; - if (accountactive) - difficulty = accountactive->getDifficulty(); + if (Account::hasActive()) { + difficulty = Account::active().getDifficulty(); + } Hotspot::hotspots.clear(); Hotspot::current = -1; @@ -6217,11 +6218,11 @@ void Game::TickOnceAfter() if (changedelay > 0 && !Person::players[0]->dead && !won) { //high scores, awards, win if (campaign) { - accountactive->winCampaignLevel(whichchoice, bonustotal, leveltime); + Account::active().winCampaignLevel(whichchoice, bonustotal, leveltime); scoreadded = 1; } else { wonleveltime = leveltime; - accountactive->winLevel(whichlevel, bonustotal - startbonustotal, leveltime); + Account::active().winLevel(whichlevel, bonustotal - startbonustotal, leveltime); } won = 1; } @@ -6264,7 +6265,7 @@ void Game::TickOnceAfter() fireSound(firestartsound); - Loadlevel(campaignlevels[accountactive->getCampaignChoicesMade()].mapname.c_str()); + Loadlevel(campaignlevels[Account::active().getCampaignChoicesMade()].mapname.c_str()); fireSound();