[Scummvm-cvs-logs] SF.net SVN: scummvm:[35001] scummvm/trunk/engines/scumm/saveload.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 11 11:25:30 CET 2008


Revision: 35001
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35001&view=rev
Author:   fingolfin
Date:     2008-11-11 10:25:29 +0000 (Tue, 11 Nov 2008)

Log Message:
-----------
SCUMM: Regulate save/load support in GMM based on VAR_MAINMENU_KEY - though I wonder whether we need it for loading at all...

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/saveload.cpp

Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp	2008-11-10 23:41:31 UTC (rev 35000)
+++ scummvm/trunk/engines/scumm/saveload.cpp	2008-11-11 10:25:29 UTC (rev 35001)
@@ -81,8 +81,11 @@
 }
 
 bool ScummEngine::canLoadGameStateCurrently() {
-	// FIXME: For now always allow loading
-	return true;
+	// FIXME: For now always allow loading in V0-V3 games
+	// FIXME: Actually, we might wish to support loading in more places.
+	// As long as we are sure it won't cause any problems... Are we
+	// aware of *any* spots where loading is not supported?
+	return (VAR_MAINMENU_KEY == 0xFF || VAR(VAR_MAINMENU_KEY) != 0);
 }
 
 Common::Error ScummEngine::saveGameState(int slot, const char *desc) {
@@ -91,9 +94,11 @@
 }
 
 bool ScummEngine::canSaveGameStateCurrently() {
-	// FIXME: For now always allow saving
-	return true;
-	return 0;
+	// FIXME: For now always allow loading in V0-V3 games
+	// TODO: Should we disallow saving in some more places,
+	// e.g. when a SAN movie is playing? Not sure whether the
+	// original EXE allowed this.
+	return (VAR_MAINMENU_KEY == 0xFF || VAR(VAR_MAINMENU_KEY) != 0);
 }
 
 


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