From 587f3cf9586f019b59e7a4145e692ebde73d52df Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 16 Jul 2010 21:56:30 +0000 Subject: CINE: Get rid of g_saveFileMan svn-id: r50944 --- engines/cine/cine.cpp | 6 ++---- engines/cine/cine.h | 2 -- engines/cine/detection.cpp | 2 +- engines/cine/saveload.cpp | 6 +++--- engines/cine/various.cpp | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) (limited to 'engines') diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index c50af52901..9c232d0d8e 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -48,10 +48,9 @@ namespace Cine { -Sound *g_sound; -Common::SaveFileManager *g_saveFileMan; +Sound *g_sound = 0; -CineEngine *g_cine; +CineEngine *g_cine = 0; CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level"); @@ -88,7 +87,6 @@ Common::Error CineEngine::run() { // Paula chipset for Amiga and Atari versions g_sound = new PaulaSound(_mixer, this); } - g_saveFileMan = _saveFileMan; _restartRequested = false; diff --git a/engines/cine/cine.h b/engines/cine/cine.h index 6f7b409ad7..6f2c2243e2 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -190,8 +190,6 @@ enum { }; -extern Common::SaveFileManager *g_saveFileMan; // TEMP - } // End of namespace Cine #endif diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp index b92ad8a0a2..9dfa2f71ea 100644 --- a/engines/cine/detection.cpp +++ b/engines/cine/detection.cpp @@ -251,7 +251,7 @@ Common::Error CineEngine::saveGameState(int slot, const char *desc) { char indexFile[80]; snprintf(indexFile, 80, "%s.dir", _targetName.c_str()); - Common::OutSaveFile *fHandle = g_saveFileMan->openForSaving(indexFile); + Common::OutSaveFile *fHandle = _saveFileMan->openForSaving(indexFile); if (!fHandle) { warning("Unable to open file %s for saving", indexFile); return Common::kUnknownError; diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp index b5adebcd0b..6db0d59b13 100644 --- a/engines/cine/saveload.cpp +++ b/engines/cine/saveload.cpp @@ -465,7 +465,7 @@ bool CineEngine::loadSaveDirectory() { char tmp[80]; snprintf(tmp, 80, "%s.dir", _targetName.c_str()); - fHandle = g_saveFileMan->openForLoading(tmp); + fHandle = _saveFileMan->openForLoading(tmp); if (!fHandle) { return false; @@ -771,7 +771,7 @@ bool CineEngine::loadPlainSaveFW(Common::SeekableReadStream &in, CineSaveGameFor } bool CineEngine::makeLoad(char *saveName) { - Common::SharedPtr saveFile(g_saveFileMan->openForLoading(saveName)); + Common::SharedPtr saveFile(_saveFileMan->openForLoading(saveName)); if (!saveFile) { renderer->drawString(otherMessages[0], 0); @@ -966,7 +966,7 @@ void CineEngine::makeSaveOS(Common::OutSaveFile &out) { } void CineEngine::makeSave(char *saveFileName) { - Common::SharedPtr fHandle(g_saveFileMan->openForSaving(saveFileName)); + Common::SharedPtr fHandle(_saveFileMan->openForSaving(saveFileName)); setMouseCursor(MOUSE_CURSOR_DISK); diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 9a10c2b5d7..82c40a2f50 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -450,7 +450,7 @@ void CineEngine::makeSystemMenu() { snprintf(tmp, 80, "%s.dir", _targetName.c_str()); - Common::OutSaveFile *fHandle = g_saveFileMan->openForSaving(tmp); + Common::OutSaveFile *fHandle = _saveFileMan->openForSaving(tmp); if (!fHandle) { warning("Unable to open file %s for saving", tmp); break; -- cgit v1.2.3