[Scummvm-cvs-logs] SF.net SVN: scummvm:[34521] scummvm/trunk/engines/kyra/detection.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Sep 14 16:08:15 CEST 2008


Revision: 34521
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34521&view=rev
Author:   lordhoto
Date:     2008-09-14 14:08:14 +0000 (Sun, 14 Sep 2008)

Log Message:
-----------
Added a hack in KyraMetaEngine::listSaves to prevent slot 0 from being listed. Check comment for additional information.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/detection.cpp

Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp	2008-09-14 14:01:24 UTC (rev 34520)
+++ scummvm/trunk/engines/kyra/detection.cpp	2008-09-14 14:08:14 UTC (rev 34521)
@@ -1135,7 +1135,10 @@
 		// Obtain the last 3 digits of the filename, since they correspond to the save slot
 		int slotNum = atoi(file->c_str() + file->size() - 3);
 		
-		if (slotNum >= 0 && slotNum <= 999) {
+		// HACK: Until we have a way to check whether a save is deletable in our launcher delete savegame dialog.
+		// We do not list slot 0 here, since it's for restarting the game and it should never be deleted.
+		// The downside of it is of course we can not load it via the menu and it isn't listed via --list-saves.
+		if (slotNum > 0 && slotNum <= 999) {
 			Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
 			if (in) {
 				if (Kyra::KyraEngine_v1::readSaveHeader(in, false, header) == Kyra::KyraEngine_v1::kRSHENoError) {
@@ -1154,7 +1157,7 @@
 }
 
 void KyraMetaEngine::removeSaveState(const char *target, int slot) const {
-	// Slot 0 can't be delted, it's for restarting the game(s)
+	// Slot 0 can't be deleted, it's for restarting the game(s)
 	if (slot == 0)
 		return;
 


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