[Scummvm-cvs-logs] scummvm master -> 3d1f1a3a21edd66f20f8de707ddcfcc8d97d13a6

bluegr bluegr at gmail.com
Tue Aug 23 10:37:07 CEST 2016


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

Summary:
cd00132d23 SCI32: Also handle game checks for "torinsg.cat" in Torin
3d1f1a3a21 SCI32: Fix restoring games from Torin's game restore dialog


Commit: cd00132d230ebf9bf51d3d111ca889fe382e2ddb
    https://github.com/scummvm/scummvm/commit/cd00132d230ebf9bf51d3d111ca889fe382e2ddb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-08-23T11:36:37+03:00

Commit Message:
SCI32: Also handle game checks for "torinsg.cat" in Torin

This shows the "Open..." button when continuing a game

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



diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index a3a97eb..e5b0aaf 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -257,11 +257,14 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
 	// by opening it. Since we don't use .cat files, we instead check
 	// for autosave.000 or autosave.001.
 	//
+	// The same logic is being followed for torinsg.cat - this shows
+	// the "Open..." button when continuing a game.
+	//
 	// This has the added benefit of not detecting an SSCI autosave.cat
 	// accompanying SSCI autosave files that we wouldn't be able to load.
-	if (g_sci->getGameId() == GID_TORIN && name == "autosave.cat") {
-		Common::String pattern = g_sci->wrapFilename("autosave.###");
+	if (g_sci->getGameId() == GID_TORIN && (name == "autosave.cat" || name == "torinsg.cat")) {
 		Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
+		const Common::String pattern = (name == "autosave.cat") ? g_sci->wrapFilename("autosave.###") : g_sci->getSavegamePattern();
 		bool exists = !saveFileMan->listSavefiles(pattern).empty();
 		if (exists) {
 			// Dummy handle. Torin only checks if this is SIGNAL_REG,


Commit: 3d1f1a3a21edd66f20f8de707ddcfcc8d97d13a6
    https://github.com/scummvm/scummvm/commit/3d1f1a3a21edd66f20f8de707ddcfcc8d97d13a6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-08-23T11:36:38+03:00

Commit Message:
SCI32: Fix restoring games from Torin's game restore dialog

The list in kListEachElementDo may be invalidated after a
selector invocation

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



diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 53be26b..bc55914 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -576,6 +576,10 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {
 			}
 		} else {
 			invokeSelector(s, curObject, slc, argc, argv, argc - 2, argv + 2);
+			// Check if the list has been invalidated after the call above
+			// (e.g. when restoring in Torin)
+			if (s->_segMan->getSegmentType(argv[0].getSegment()) != SEG_TYPE_LISTS)
+				return s->r_acc;
 		}
 
 		curNode = s->_segMan->lookupNode(list->nextNodes[list->numRecursions]);






More information about the Scummvm-git-logs mailing list