[Scummvm-git-logs] scummvm master -> 7afe586e9a349b9dd1dca8aeadfb95f3d78d0c1b

sluicebox 22204938+sluicebox at users.noreply.github.com
Fri May 8 04:42:22 UTC 2020


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:
267317f650 SCI: Add script_said debug command to help text, regroup
7afe586e9a SCI: Fix KQ6 floating off the logic cliff steps


Commit: 267317f65005c4f997c77af99160fd3e7ae822dd
    https://github.com/scummvm/scummvm/commit/267317f65005c4f997c77af99160fd3e7ae822dd
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-05-07T21:15:08-07:00

Commit Message:
SCI: Add script_said debug command to help text, regroup

Add another missing command to debug help text, remove a duplicate,
fix a typo, update the grouping to match internal organization.

Changed paths:
    engines/sci/console.cpp


diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 8b10279482..2ffda09965 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -409,9 +409,6 @@ bool Console::cmdHelp(int argc, const char **argv) {
 	debugPrintf(" dissect_script - Examines a script\n");
 	debugPrintf(" backtrace / bt - Dumps the send/self/super/call/calle/callb stack\n");
 	debugPrintf(" trace / t / s - Executes one operation (no parameters) or several operations (specified as a parameter) \n");
-	debugPrintf(" script_objects / scro - Shows all objects inside a specfied script\n");
-	debugPrintf(" script_steps - Shows the number of executed SCI operations\n");
-	debugPrintf(" script_strings / scrs - Shows all strings inside a specified script\n");
 	debugPrintf(" stepover / p - Executes one operation, skips over call/send\n");
 	debugPrintf(" step_ret / pret - Steps forward until ret is called on the current execution stack level.\n");
 	debugPrintf(" step_event / se - Steps forward until a SCI event is received.\n");
@@ -436,6 +433,9 @@ bool Console::cmdHelp(int argc, const char **argv) {
 	debugPrintf("\n");
 	debugPrintf("VM:\n");
 	debugPrintf(" script_steps - Shows the number of executed SCI operations\n");
+	debugPrintf(" script_objects / scro - Shows all objects inside a specified script\n");
+	debugPrintf(" script_strings / scrs - Shows all strings inside a specified script\n");
+	debugPrintf(" script_said - Shows all said - strings inside a specified script\n");
 	debugPrintf(" vm_varlist / vmvarlist / vl - Shows the addresses of variables in the VM\n");
 	debugPrintf(" vm_vars / vmvars / vv - Displays or changes variables in the VM\n");
 	debugPrintf(" stack - Lists the specified number of stack elements\n");


Commit: 7afe586e9a349b9dd1dca8aeadfb95f3d78d0c1b
    https://github.com/scummvm/scummvm/commit/7afe586e9a349b9dd1dca8aeadfb95f3d78d0c1b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-05-07T21:26:27-07:00

Commit Message:
SCI: Fix KQ6 floating off the logic cliff steps

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 97dd4dd927..29e26f7b9f 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -4511,6 +4511,71 @@ static const uint16 kq6CDPatchWallFlowerDanceFix[] = {
 	PATCH_END
 };
 
+// In room 300 at the bottom of the logic cliffs, clicking Walk while Alexander
+//  randomly wobbles on lower steps causes him to float around the room. Scripts
+//  attempt to prevent this by ignoring Walk when ego:view is 301 and ego:loop
+//  is 3, which is wobbling animation, but this is incomplete because egoWobbles
+//  also animates with view 3011. The rest of the cliff rooms directly test if
+//  egoWobbles is running and so they don't have this bug. egoWobbles isn't
+//  exported so room 300 is left testing ego's state.
+//
+// We fix this by adding the missing test for view 3011 so that the Walk verb is
+//  successfully ignored whenever egoWobbles is running.
+//
+// Applies to: All versions
+// Responsible methods: beach:doVerb, WalkFeature:doVerb
+static const uint16 kq6SignatureCliffStepFloatFix[] = {
+	0x36,                               // push
+	0x34, SIG_UINT16(0x012d),           // ldi 012d
+	0x1a,                               // eq?      [ ego:view == 301 ]
+	0x31, 0x12,                         // bnt 12   [ not wobbling ]
+	0x39, 0x03,                         // pushi 03 [ loop ]
+	0x76,                               // push0
+	0x81, 0x00,                         // lag 00
+	0x4a, 0x04,                         // send 04  [ ego loop? ]
+	0x36,                               // push
+	0x35, SIG_MAGICDWORD, 0x03,         // ldi 03
+	0x1a,                               // eq?      [ ego:loop == 3 ]
+	0x31, 0x05,                         // bnt 05   [ not wobbling ]
+	0x35, 0x00,                         // ldi 00
+	0x32, SIG_ADDTOOFFSET(+2),          // jmp      [ end of method ]
+	0x76,                               // push0    [ y ]
+	0x76,                               // push0
+	0x81, 0x00,                         // lag 00
+	0x4a, 0x04,                         // send 04  [ ego y? ]
+	0x36,                               // push
+	0x35, 0x26,                         // ldi 26
+	0x22,                               // lt?      [ ego:y < 38 ]
+	SIG_ADDTOOFFSET(+17),
+	0x32,                               // jmp      [ end of method ]
+	SIG_END
+};
+
+static const uint16 kq6PatchCliffStepFloatFix[] = {
+	0x38, PATCH_UINT16(0x0bc3),         // pushi 0bc3
+	0x1a,                               // eq?      [ ego:view == 3011 ]
+	0x2f, 0x12,                         // bt 12    [ wobbling ]
+	0x60,                               // pprev
+	0x34, PATCH_UINT16(0x012d),         // ldi 012d
+	0x1a,                               // eq?      [ ego:view == 301 ]
+	0x31, 0x0d,                         // bnt 0d   [ not wobbling ]
+	0x39, 0x03,                         // pushi 03
+	0x3c,                               // dup      [ loop ]
+	0x76,                               // push0
+	0x81, 0x00,                         // lag 00
+	0x4a, 0x04,                         // send 04  [ ego loop? ]
+	0x1a,                               // eq?      [ ego:loop == 3 ]
+	0x31, 0x02,                         // bnt 02   [ not wobbling ]
+	0x33, 0x1a,                         // jmp 1a   [ end of method ]
+	0x76,                               // push0    [ y ]
+	0x76,                               // push0
+	0x81, 0x00,                         // lag 00
+	0x4a, 0x04,                         // send 04  [ ego y? ]
+	0x39, 0x26,                         // pushi 26
+	0x20,                               // ge?      [ 38 >= ego:y ]
+	PATCH_END
+};
+
 // KQ6 truncates messages longer than 400 characters in the CD and Mac versions.
 //  This is most prominent when reading Cassima's letter to Alexander. When the
 //  Messager class was upgraded to support audio, a 400 character buffer was
@@ -4569,7 +4634,6 @@ static const uint16 kq6PatchTruncatedMessagesFix[] = {
 	PATCH_END
 };
 
-
 // Audio + subtitles support - SHARED! - used for King's Quest 6 and Laura Bow 2.
 //  This patch gets enabled when the user selects "both" in the ScummVM
 //  "Speech + Subtitles" menu. We currently use global[98d] to hold a kMemory
@@ -4987,6 +5051,7 @@ static const uint16 kq6CDPatchAudioTextMenuSupport[] = {
 static const SciScriptPatcherEntry kq6Signatures[] = {
 	{  true,    87, "fix Drink Me bottle",                            1, kq6SignatureDrinkMeFix,                   kq6PatchDrinkMeFix },
 	{ false,    87, "Mac: Drink Me pic",                              1, kq6SignatureMacDrinkMePic,                kq6PatchMacDrinkMePic },
+	{  true,   300, "fix floating off steps",                         2, kq6SignatureCliffStepFloatFix,            kq6PatchCliffStepFloatFix },
 	{  true,   480, "CD: fix wallflower dance",                       1, kq6CDSignatureWallFlowerDanceFix,         kq6CDPatchWallFlowerDanceFix },
 	{  true,   481, "fix duplicate baby cry",                         1, kq6SignatureDuplicateBabyCry,             kq6PatchDuplicateBabyCry },
 	{  true,   640, "fix 'Tickets, only' message",                    1, kq6SignatureTicketsOnly,                  kq6PatchTicketsOnly },




More information about the Scummvm-git-logs mailing list