[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.26,1.27 engine.h,1.16,1.17

Max Horn fingolfin at users.sourceforge.net
Fri Nov 26 17:15:52 CET 2004


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24926/base

Modified Files:
	engine.cpp engine.h 
Log Message:
Moved Engine::getSavePath() to class SaveFileManager; removed the 'directory' parameter from SaveFileManager::openSavefile and listSavefiles (they always use getSavePath() now, which is what we did anyway)

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- engine.cpp	24 Nov 2004 00:13:58 -0000	1.26
+++ engine.cpp	27 Nov 2004 00:25:57 -0000	1.27
@@ -81,42 +81,6 @@
 	_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
 }
 
-const char *Engine::getSavePath() const {
-
-#if defined(__PALM_OS__)
-	return SCUMMVM_SAVEPATH;
-#else
-
-	const char *dir = NULL;
-
-#if !defined(MACOS_CARBON) && !defined(_WIN32_WCE)
-	dir = getenv("SCUMMVM_SAVEPATH");
-#endif
-
-	// If SCUMMVM_SAVEPATH was not specified, try to use game specific savepath from config
-	if (!dir || dir[0] == 0) {
-		dir = ConfMan.get("savepath").c_str();
-		
-		// Work around a bug (#999122) in the original 0.6.1 release of
-		// ScummVM, which would insert a bad savepath value into config files.
-		if (0 == strcmp(dir, "None")) {
-			ConfMan.removeKey("savepath", ConfMan.getActiveDomain());
-			ConfMan.flushToDisk();
-			dir = ConfMan.get("savepath").c_str();
-		}
-	}
-
-#ifdef _WIN32_WCE
-	if (dir[0] == 0)
-		dir = _gameDataPath.c_str();
-#endif
-
-	assert(dir);
-
-	return dir;
-#endif
-}
-
 const char *Engine::getGameDataPath() const {
 	return _gameDataPath.c_str();
 }

Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- engine.h	24 Nov 2004 00:13:58 -0000	1.16
+++ engine.h	27 Nov 2004 00:25:57 -0000	1.17
@@ -57,9 +57,6 @@
 	 */
 	virtual int go() = 0;
 
-	/** Get the path to the save game directory. */
-	virtual const char *getSavePath() const;
-
 	/** Get the path to the game data directory. */
 	virtual const char *getGameDataPath() const;
 





More information about the Scummvm-git-logs mailing list