[Scummvm-cvs-logs] SF.net SVN: scummvm:[50944] scummvm/trunk/engines/cine

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Jul 16 23:56:31 CEST 2010


Revision: 50944
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50944&view=rev
Author:   fingolfin
Date:     2010-07-16 21:56:30 +0000 (Fri, 16 Jul 2010)

Log Message:
-----------
CINE: Get rid of g_saveFileMan

Modified Paths:
--------------
    scummvm/trunk/engines/cine/cine.cpp
    scummvm/trunk/engines/cine/cine.h
    scummvm/trunk/engines/cine/detection.cpp
    scummvm/trunk/engines/cine/saveload.cpp
    scummvm/trunk/engines/cine/various.cpp

Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp	2010-07-16 21:50:12 UTC (rev 50943)
+++ scummvm/trunk/engines/cine/cine.cpp	2010-07-16 21:56:30 UTC (rev 50944)
@@ -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 @@
 		// Paula chipset for Amiga and Atari versions
 		g_sound = new PaulaSound(_mixer, this);
 	}
-	g_saveFileMan = _saveFileMan;
 
 	_restartRequested = false;
 

Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h	2010-07-16 21:50:12 UTC (rev 50943)
+++ scummvm/trunk/engines/cine/cine.h	2010-07-16 21:56:30 UTC (rev 50944)
@@ -190,8 +190,6 @@
 };
 
 
-extern Common::SaveFileManager *g_saveFileMan; // TEMP
-
 } // End of namespace Cine
 
 #endif

Modified: scummvm/trunk/engines/cine/detection.cpp
===================================================================
--- scummvm/trunk/engines/cine/detection.cpp	2010-07-16 21:50:12 UTC (rev 50943)
+++ scummvm/trunk/engines/cine/detection.cpp	2010-07-16 21:56:30 UTC (rev 50944)
@@ -251,7 +251,7 @@
 	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;

Modified: scummvm/trunk/engines/cine/saveload.cpp
===================================================================
--- scummvm/trunk/engines/cine/saveload.cpp	2010-07-16 21:50:12 UTC (rev 50943)
+++ scummvm/trunk/engines/cine/saveload.cpp	2010-07-16 21:56:30 UTC (rev 50944)
@@ -465,7 +465,7 @@
 	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::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::makeSave(char *saveFileName) {
-	Common::SharedPtr<Common::OutSaveFile> fHandle(g_saveFileMan->openForSaving(saveFileName));
+	Common::SharedPtr<Common::OutSaveFile> fHandle(_saveFileMan->openForSaving(saveFileName));
 
 	setMouseCursor(MOUSE_CURSOR_DISK);
 

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2010-07-16 21:50:12 UTC (rev 50943)
+++ scummvm/trunk/engines/cine/various.cpp	2010-07-16 21:56:30 UTC (rev 50944)
@@ -450,7 +450,7 @@
 
 						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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list