Skip to content

Commit

Permalink
TOON: Remove unecessary usages of g_system.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Jun 7, 2012
1 parent 8deb8b3 commit 6cda28a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions engines/toon/toon.cpp
Expand Up @@ -168,7 +168,7 @@ void ToonEngine::waitForScriptStep() {
// Wait after a specified number of script steps when executing a script
// to lower CPU usage
if (++_scriptStep >= 40) {
g_system->delayMillis(1);
_system->delayMillis(1);
_scriptStep = 0;
}
}
Expand Down Expand Up @@ -2979,8 +2979,7 @@ bool ToonEngine::saveGame(int32 slot, const Common::String &saveGameDesc) {
return false; // dialog aborted

Common::String savegameFile = getSavegameName(savegameId);
Common::SaveFileManager *saveMan = g_system->getSavefileManager();
Common::OutSaveFile *saveFile = saveMan->openForSaving(savegameFile);
Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(savegameFile);
if (!saveFile)
return false;

Expand Down Expand Up @@ -3068,8 +3067,7 @@ bool ToonEngine::loadGame(int32 slot) {
return false; // dialog aborted

Common::String savegameFile = getSavegameName(savegameId);
Common::SaveFileManager *saveMan = g_system->getSavefileManager();
Common::InSaveFile *loadFile = saveMan->openForLoading(savegameFile);
Common::InSaveFile *loadFile = _saveFileMan->openForLoading(savegameFile);
if (!loadFile)
return false;

Expand Down

0 comments on commit 6cda28a

Please sign in to comment.