[Scummvm-cvs-logs] scummvm master -> 9fcd3ece536e5539b36ba49916c449a45b5e733e

bluegr md5 at scummvm.org
Wed Oct 12 02:33:23 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9fcd3ece53 SCI: kSave(3) is kCheckSaveGame() and kSave(6) is kFileIOUnlink()


Commit: 9fcd3ece536e5539b36ba49916c449a45b5e733e
    https://github.com/scummvm/scummvm/commit/9fcd3ece536e5539b36ba49916c449a45b5e733e
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-10-11T17:25:27-07:00

Commit Message:
SCI: kSave(3) is kCheckSaveGame() and kSave(6) is kFileIOUnlink()

Changed paths:
    engines/sci/engine/kfile.cpp



diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 06af6e0..9e94418 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -1167,8 +1167,17 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) {
 		return kRestoreGame(s, argc - 1,argv + 1);
 	case 2:
 		return kGetSaveDir(s, argc - 1, argv + 1);
+	case 3:
+		return kCheckSaveGame(s, argc - 1, argv + 1);
 	case 5:
 		return kGetSaveFiles(s, argc - 1, argv + 1);
+	case 6:
+		// This is used in Shivers to delete saved games, however it
+		// always passes the same file name (SHIVER), so it doesn't
+		// actually delete anything...
+		// TODO: Check why this happens
+		// argv[1] is a string (most likely the save game directory)
+		return kFileIOUnlink(s, argc - 2, argv + 2);
 	case 8:
 		// TODO
 		// This is a timer callback, with 1 parameter: the timer object
@@ -1179,10 +1188,9 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) {
 		// This function has to return something other than 0 to proceed
 		return s->r_acc;
 	default:
-		warning("Unknown/unhandled kSave subop %d", argv[0].toUint16());
+		kStub(s, argc, argv);
+		return NULL_REG;
 	}
-
-	return NULL_REG;
 }
 
 #endif






More information about the Scummvm-git-logs mailing list