aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2010-07-16 21:56:30 +0000
committerMax Horn2010-07-16 21:56:30 +0000
commit587f3cf9586f019b59e7a4145e692ebde73d52df (patch)
tree3a01c42899c27e6987cea587944b51b159fc855e /engines
parente75eee21e38c71ae67382ff83ce926991f58743a (diff)
downloadscummvm-rg350-587f3cf9586f019b59e7a4145e692ebde73d52df.tar.gz
scummvm-rg350-587f3cf9586f019b59e7a4145e692ebde73d52df.tar.bz2
scummvm-rg350-587f3cf9586f019b59e7a4145e692ebde73d52df.zip
CINE: Get rid of g_saveFileMan
svn-id: r50944
Diffstat (limited to 'engines')
-rw-r--r--engines/cine/cine.cpp6
-rw-r--r--engines/cine/cine.h2
-rw-r--r--engines/cine/detection.cpp2
-rw-r--r--engines/cine/saveload.cpp6
-rw-r--r--engines/cine/various.cpp2
5 files changed, 7 insertions, 11 deletions
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<Common::InSaveFile> saveFile(g_saveFileMan->openForLoading(saveName));
+ Common::SharedPtr<Common::InSaveFile> 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<Common::OutSaveFile> fHandle(g_saveFileMan->openForSaving(saveFileName));
+ Common::SharedPtr<Common::OutSaveFile> 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;