[Scummvm-git-logs] scummvm master -> 6b910669b37654b32e018c5b452b6775f0d5d088

sluicebox 22204938+sluicebox at users.noreply.github.com
Tue Apr 27 05:52:18 UTC 2021


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:
11fec236a2 SCI: Make KQ6 'Tickets, only' script patch a workaround
6b910669b3 SCI: Fix KQ6 'Tickets, only' CD audio interruption


Commit: 11fec236a2758467daceebee020172d3b692db72
    https://github.com/scummvm/scummvm/commit/11fec236a2758467daceebee020172d3b692db72
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-04-26T22:50:10-07:00

Commit Message:
SCI: Make KQ6 'Tickets, only' script patch a workaround

In addition to simplifying, this fixes the message in Spanish and
Italian versions. The CD patch signature matched these floppy versions
too and altered their correct messages.

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


diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 90e1e30047..6c6a1e8bdb 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -5151,61 +5151,6 @@ static const uint16 kq6PatchMacDrinkMePic[] = {
 	PATCH_END
 };
 
-// During the common Game Over cutscene, one of the guys says "Tickets, only",
-//  but the subtitle says "Tickets, please". Normally people wouldn't have
-//  noticed, but ScummVM supports audio + subtitles in this game at the same
-//  time. This is caused by a buggy message, which really has this text + audio
-//  attached.
-// We assume that "Tickets, only" (the audio) is the correct one. There is
-//  another message with "Tickets, only" in both text and audio. We change
-//  message 1, 0, 1, 1 to message 5, 0, 0, 2 to fix this issue.
-// This mismatch also occurs in Sierra SCI.
-//
-// Applies to at least: PC-CD
-// Responsible method: modeLessScript::changeState(0) in script 640
-static const uint16 kq6SignatureTicketsOnly[] = {
-	0x3c,                               // dup
-	0x35, 0x00,                         // ldi 0
-	0x1a,                               // eq?
-	SIG_MAGICDWORD,
-	0x31, 0x2b,                         // bnt [skip over state 0]
-	0x39, 0x1e,                         // pushi font (we keep the hardcoded selectors in here simply because this is only for KQ6-CD)
-	0x78,                               // push1
-	0x89, 0x16,                         // lsg global[16h]
-	0x38, SIG_UINT16(0x009a),           // pushi posn
-	0x7a,                               // push2
-	0x38, SIG_UINT16(0x00c8),           // pushi 00c8h (200d)
-	0x39, 0x64,                         // pushi 64h (100d)
-	0x38, SIG_UINT16(0x00ab),           // pushi say
-	0x39, 0x05,                         // pushi 05 (parameter count for say)
-	0x76,                               // push0
-	0x78,                               // push1
-	0x76,                               // push0
-	0x78,                               // push1
-	0x78,                               // push1
-	SIG_END
-};
-
-static const uint16 kq6PatchTicketsOnly[] = {
-	0x32, PATCH_UINT16(0x0000),         // jmp (waste 3 bytes)
-	0x2f, 0x2c,                         // bt [skip over state 0] (saves 1 byte)
-	0x39, 0x1e,                         // pushi font (we keep the hardcoded selectors in here simply because this is only for KQ6-CD)
-	0x78,                               // push1
-	0x89, 0x16,                         // lsg global[16h]
-	0x38, PATCH_UINT16(0x009a),         // pushi posn
-	0x7a,                               // push2
-	0x38, PATCH_UINT16(0x00c8),         // pushi 00c8h (200d)
-	0x39, 0x64,                         // pushi 64h (100d)
-	0x38, PATCH_UINT16(0x00ab),         // pushi say
-	0x39, 0x05,                         // pushi 05 (parameter count for say)
-	0x76,                               // push0
-	0x39, 0x05,                         // pushi 05
-	0x76,                               // push0
-	0x76,                               // push0
-	0x7a,                               // push2
-	PATCH_END
-};
-
 // Looking at the ribbon in inventory says that there's a hair even after it's
 //  been removed. This occurs after the hair has been put in the skull or is on
 //  a different inventory page than the ribbon.
@@ -6340,7 +6285,6 @@ static const SciScriptPatcherEntry kq6Signatures[] = {
 	{  true,   480, "fix getting baby tears",                         1, kq6SignatureGetBabyTears,                 kq6PatchGetBabyTears },
 	{  true,   481, "fix duplicate baby cry",                         1, kq6SignatureDuplicateBabyCry,             kq6PatchDuplicateBabyCry },
 	{  true,   481, "fix duplicate baby tears point",                 1, kq6SignatureDuplicateBabyTearsPoint,      kq6PatchDuplicateBabyTearsPoint },
-	{  true,   640, "fix 'Tickets, only' message",                    1, kq6SignatureTicketsOnly,                  kq6PatchTicketsOnly },
 	{  true,   745, "fix wedding genie lamp message",                 1, kq6SignatureWeddingGenieLampMessage,      kq6PatchWeddingGenieLampMessage },
 	{  true,   800, "fix Cassima secret passage peephole",            1, kq6SignatureCassimaSecretPassage,         kq6PatchCassimaSecretPassage },
 	{  true,   907, "fix inventory stack leak",                       1, kq6SignatureInventoryStackFix,            kq6PatchInventoryStackFix },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 295610f9de..7699cb2f70 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -1296,6 +1296,13 @@ static const SciMessageWorkaroundEntry messageWorkarounds[] = {
 	{ GID_GK2,           SCI_MEDIA_ALL,    K_LANG_NONE,     -1,  120,  18,  64,   0,  1, { MSG_WORKAROUND_REMAP,    120,  18,  44,   0,  1,  0,   0,   0, NULL } },
 	// Clicking any item other than the dagger on theater vent in room 11853
 	{ GID_GK2,           SCI_MEDIA_ALL,    K_LANG_NONE,     -1, 1185,   4,   0,   0,  1, { MSG_WORKAROUND_REMAP,   1185,   4,  62,   0,  1,  0,   0,   0, NULL } },
+	// During the common Game Over cutscene, the "Ticket, please!" message has the incorrect audio
+	//  "Tickets only!", which is the response the skeleton gives when talking to him in the land
+	//  of the dead. Normally people wouldn't have noticed, but ScummVM supports audio + subtitles
+	//  in this game at the same time. We could fix this either way because there are non-buggy
+	//  versions of each message. "Ticket, please!" is the correct message but "Tickets only!"
+	//  is the audio that everyone is used to, so we make the text match "Tickets only!" on CD.
+	{ GID_KQ6,           SCI_MEDIA_CD,     K_LANG_NONE,     -1,  640,   1,   0,   1,  1, { MSG_WORKAROUND_REMAP,    640,   5,   0,   0,  2, 83,   0,   0, NULL } },
 	// Clicking the drink-me potion on ego in the castle basement hallways while guards are around
 	{ GID_KQ6,           SCI_MEDIA_ALL,    K_LANG_NONE,     -1,  840,   3,  14,   1,  1, { MSG_WORKAROUND_REMAP,    899,   0,   0, 198,  1, 99,   0,   0, NULL } },
 	{ GID_KQ6,           SCI_MEDIA_ALL,    K_LANG_NONE,     -1,  899,   1,  14,   1,  1, { MSG_WORKAROUND_REMAP,    899,   0,   0, 198,  1, 99,   0,   0, NULL } },


Commit: 6b910669b37654b32e018c5b452b6775f0d5d088
    https://github.com/scummvm/scummvm/commit/6b910669b37654b32e018c5b452b6775f0d5d088
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-04-26T22:50:10-07:00

Commit Message:
SCI: Fix KQ6 'Tickets, only' CD audio interruption

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 6c6a1e8bdb..d858e2ca0b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -5197,6 +5197,61 @@ static const uint16 kq6PatchLookRibbonFix[] = {
 	PATCH_END
 };
 
+// During the common Game Over cutscene, the CD audio for "Tickets, only" gets
+//  cut off. This only worked in the original interpreter at slow CPU speeds.
+//  modeLessScript sets a 4 second timer for the message to complete. This is
+//  enough time, but actor animations also cue modeLessScript, and they complete
+//  in 2 seconds unless the interpreter can't keep up due to a slow CPU.
+//
+// We fix this by ignoring the cue from deathCartoonScr if CD audio is enabled
+//  and the audio timeout hasn't completed. This does not change scene duration
+//  or actor delays or when messages start. Text-only mode is unaffected.
+//
+// Applies to: PC CD
+// Responsible method: modeLessScript:changeState
+static const uint16 kq6CDSignatureTicketsOnlyAudioTiming[] = {
+	0x31, 0x2b,                         // bnt 2b [ state 1 ]
+	SIG_ADDTOOFFSET(+38),
+	SIG_MAGICDWORD,
+	0x65, 0x1c,                         // aTop seconds
+	0x32, SIG_UINT16(0x0051),           // jmp 0051 [ end of method ]
+	0x3c,                               // dup
+	0x35, 0x01,                         // ldi 01
+	0x1a,                               // eq?
+	0x31, 0x0c,                         // bnt 0c [ state 2 ]
+	0x81, 0x19,                         // lag 19 [ dialog ]
+	0x30, SIG_UINT16(0x0046),           // bnt 0046
+	0x39, SIG_SELECTOR8(dispose),       // pushi dispose
+	0x76,                               // push0
+	0x4a, 0x04,                         // send 04 [ dialog dispose: ]
+	0x33, 0x3f,                         // jmp 3f
+	SIG_ADDTOOFFSET(+44),
+	0x65, 0x1c,                         // aTop seconds
+	SIG_ADDTOOFFSET(+8),
+	0x81, 0x19,                         // lag 19 [ dialog ]
+	SIG_END
+};
+
+static const uint16 kq6CDPatchTicketsOnlyAudioTiming[] = {
+	0x31, 0x28,                         // bnt 28 [ state 1 ]
+	PATCH_ADDTOOFFSET(+38),
+	0x33, 0x41,                         // jmp 41 [ aTop seconds, end of method ]
+	0x3c,                               // dup
+	0x18,                               // not [ acc = 1 ]
+	0x1a,                               // eq?
+	0x31, 0x10,                         // bnt 10 [ state 2 ]
+	0x81, 0x5a,                         // lag 5a [ mode ]
+	0x7a,                               // push2  [ audio ]
+	0x12,                               // and    [ is audio enabled? ]
+	0x31, 0x40,                         // bnt 40 [ if no audio then dispose dialog normally ]
+	0x63, 0x1c,                         // pToa seconds
+	0x2f, 0x04,                         // bt 04  [ ignore cue from deathCartoonScr if audio is playing ]
+	0x6b, 0x1a,                         // ipToa cycles [ cycles = 1 ]
+	0x33, 0x38,                         // jmp 38 [ dispose dialog normally ]
+	0x6d, 0x14,                         // dpToa state [ state = 0 so that state 1 can repeat ]
+	PATCH_END
+};
+
 // KQ6 CD introduced a bug in the wallflower dance in room 480. The dance is
 //  supposed to last until the music ends but in Text mode it stops after only
 //  three seconds once the user gains control. This isn't usually enough time
@@ -6285,6 +6340,7 @@ static const SciScriptPatcherEntry kq6Signatures[] = {
 	{  true,   480, "fix getting baby tears",                         1, kq6SignatureGetBabyTears,                 kq6PatchGetBabyTears },
 	{  true,   481, "fix duplicate baby cry",                         1, kq6SignatureDuplicateBabyCry,             kq6PatchDuplicateBabyCry },
 	{  true,   481, "fix duplicate baby tears point",                 1, kq6SignatureDuplicateBabyTearsPoint,      kq6PatchDuplicateBabyTearsPoint },
+	{  true,   640, "fix 'Tickets Only' audio timing",                1, kq6CDSignatureTicketsOnlyAudioTiming,     kq6CDPatchTicketsOnlyAudioTiming },
 	{  true,   745, "fix wedding genie lamp message",                 1, kq6SignatureWeddingGenieLampMessage,      kq6PatchWeddingGenieLampMessage },
 	{  true,   800, "fix Cassima secret passage peephole",            1, kq6SignatureCassimaSecretPassage,         kq6PatchCassimaSecretPassage },
 	{  true,   907, "fix inventory stack leak",                       1, kq6SignatureInventoryStackFix,            kq6PatchInventoryStackFix },




More information about the Scummvm-git-logs mailing list