[Scummvm-git-logs] scummvm master -> 084dfe9e039a555c722731c3a292a26a2757141d

csnover csnover at users.noreply.github.com
Sat Oct 1 21:07:39 CEST 2016


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

Summary:
7d77a712d3 SCI32: Fix interrogation screen crash in GK1
d527e75f32 SCI32: Fix signature of kString(ArraySetElements) to allow 0 args
084dfe9e03 SCI32: Use selector lookup in Torin script patch instead of magic numbers


Commit: 7d77a712d384e050a3b5a6eadc95af794a7e43a0
    https://github.com/scummvm/scummvm/commit/7d77a712d384e050a3b5a6eadc95af794a7e43a0
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-10-01T14:07:26-05:00

Commit Message:
SCI32: Fix interrogation screen crash in GK1

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



diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index c7f2e08..e643a04 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -995,8 +995,32 @@ static const uint16 gk1PatchDay10GabrielDressUp[] = {
 	PATCH_END
 };
 
+// GK1 initializes the global interrogation array with an int16 array, which
+// happens to work in SSCI because object references are int16s, but in ScummVM
+// object references are reg_ts, so this array needs to be created as an IDArray
+// instead
+static const uint16 gk1SignatureInterrogationArray1[] = {
+	0x38, SIG_SELECTOR16(new), // pushi new
+	0x78,                      // push1
+	SIG_MAGICDWORD,
+	0x39, 0x0f,                // pushi 15
+	0x51, 0x0a,                // class IntArray
+	SIG_END
+};
+
+static const uint16 gk1PatchInterrogationArray1[] = {
+	PATCH_ADDTOOFFSET(+3),  // pushi new
+	PATCH_ADDTOOFFSET(+1),  // push1
+	PATCH_ADDTOOFFSET(+2),  // pushi 15
+	0x51, 0x0b,             // class IDArray
+	PATCH_END
+};
+
 //          script, description,                                      signature                         patch
 static const SciScriptPatcherEntry gk1Signatures[] = {
+	{  true,    10, "fix interrogation array type 1/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 },
+	{  true,    50, "fix interrogation array type 2/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 },
+	{  true,    93, "fix interrogation array type 3/3",            1, gk1SignatureInterrogationArray1,  gk1PatchInterrogationArray1 },
 	{  true,    51, "interrogation bug",                           1, gk1SignatureInterrogationBug,     gk1PatchInterrogationBug },
 	{  true,   212, "day 5 drum book dialogue error",              1, gk1SignatureDay5DrumBookDialogue, gk1PatchDay5DrumBookDialogue },
 	{  true,   212, "day 5 phone freeze",                          1, gk1SignatureDay5PhoneFreeze,      gk1PatchDay5PhoneFreeze },


Commit: d527e75f321dab77d24d13d3355c6620a5d10404
    https://github.com/scummvm/scummvm/commit/d527e75f321dab77d24d13d3355c6620a5d10404
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-10-01T14:07:26-05:00

Commit Message:
SCI32: Fix signature of kString(ArraySetElements) to allow 0 args

Changed paths:
    engines/sci/engine/kernel_tables.h



diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 5874fe5..d616bfe 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -528,7 +528,7 @@ static const SciKernelMapSubEntry kString_subops[] = {
 	{ SIG_THRU_SCI21MID,   0, MAP_CALL(StringNew),                 "i(i)",                 NULL },
 	{ SIG_THRU_SCI21MID,   1, MAP_CALL(ArrayGetSize),              "r",                    NULL },
 	{ SIG_THRU_SCI21MID,   2, MAP_CALL(StringGetChar),             "ri",                   NULL },
-	{ SIG_THRU_SCI21MID,   3, MAP_CALL(ArraySetElements),          "rii*",                 kArraySetElements_workarounds },
+	{ SIG_THRU_SCI21MID,   3, MAP_CALL(ArraySetElements),          "ri(i*)",               kArraySetElements_workarounds },
 	{ SIG_THRU_SCI21MID,   4, MAP_CALL(StringFree),                "[0r]",                 NULL },
 	{ SIG_THRU_SCI21MID,   5, MAP_CALL(ArrayFill),                 "rii",                  NULL },
 	{ SIG_THRU_SCI21MID,   6, MAP_CALL(ArrayCopy),                 "ririi",                NULL },


Commit: 084dfe9e039a555c722731c3a292a26a2757141d
    https://github.com/scummvm/scummvm/commit/084dfe9e039a555c722731c3a292a26a2757141d
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-10-01T14:07:26-05:00

Commit Message:
SCI32: Use selector lookup in Torin script patch instead of magic numbers

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



diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index e643a04..2c54d2b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -4600,16 +4600,16 @@ static const SciScriptPatcherEntry sq6Signatures[] = {
 // references are reg_ts, so this array needs to be created as an IDArray
 // instead
 static const uint16 torinInventItemSlotsSignature[] = {
-	0x38, SIG_UINT16(0x8d), // pushi $8d (new)
-	0x78,                   // push1
+	0x38, SIG_SELECTOR16(new), // pushi new
+	0x78,                      // push1
 	SIG_MAGICDWORD,
-	0x67, 0x2e,             // pTos $2e (invSlotsTot)
-	0x51, 0x0b,             // class IntArray
+	0x67, 0x2e,                // pTos $2e (invSlotsTot)
+	0x51, 0x0b,                // class IntArray
 	SIG_END
 };
 
 static const uint16 torinInventItemSlotsPatch[] = {
-	PATCH_ADDTOOFFSET(+3),  // pushi $8d (new)
+	PATCH_ADDTOOFFSET(+3),  // pushi new
 	PATCH_ADDTOOFFSET(+1),  // push1
 	PATCH_ADDTOOFFSET(+2),  // pTos $2e (invSlotsTot)
 	0x51, 0x0c,             // class IDArray





More information about the Scummvm-git-logs mailing list