[Scummvm-git-logs] scummvm master -> cadd89e675dbca906fb492fac4e4738bf646bf9e

m-kiewitz m_kiewitz at users.sourceforge.net
Mon May 15 22:56:14 CEST 2017


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:
cadd89e675 SCI: Add script patch for "Tickets, only" during game over scene


Commit: cadd89e675dbca906fb492fac4e4738bf646bf9e
    https://github.com/scummvm/scummvm/commit/cadd89e675dbca906fb492fac4e4738bf646bf9e
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2017-05-15T22:56:04+02:00

Commit Message:
SCI: Add script patch for "Tickets, only" during game over scene

Audio played was "Tickets, only", subtitle shows "Tickets, please".

Also remove forcing myDialog for KQ6Print::say (which was added,
while fixing this script patch).
see a46f3c162581740a3cad27e1168164ca91beb9c9
Forcing myDialog causes issues during game over screen (bug #9771).
Bug is solved by this, but script patch isn't perfect right now.

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 b0a307d..1a276b1 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1469,6 +1469,61 @@ static const uint16 kq6PatchDrinkMeFix[] = {
 	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 and there is a
+// 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)
+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
+};
+
 // 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 pointer.
@@ -1637,13 +1692,20 @@ static const uint16 kq6CDPatchAudioTextSupport2[] = {
 // Additional patch specifically for King's Quest 6
 //  Fixes special windows, used for example in the Pawn shop (room 280),
 //   when the man in a robe complains about no more mints.
-//   Or also in room 300 at the cliffs (aka copy protection), when Alexander falls down the cliffs.
+//   Or also in room 300 at the cliffs (aka copy protection), when Alexander falls down the cliffs (closes automatically, but too late).
+//   Or in room 210, when Alexander gives the ring to the nightingale (these ones will need a mouse click).
+//
 //  We have to change even more code, because the game uses PODialog class for
 //   text windows and myDialog class for audio. Both are saved to KQ6Print::dialog
+//
+//  Changing KQ6Print::dialog is disabled for now, because it has side-effects (breaking game over screens)
+//
+//  Original comment:
 //  Sadly PODialog is created during KQ6Print::addText, myDialog is set during
 //   KQ6Print::showSelf, which is called much later and KQ6Print::addText requires
 //   KQ6Print::dialog to be set, which means we have to set it before calling addText
 //   for audio mode, otherwise the user would have to click to get those windows disposed.
+//
 // Applies to at least: PC-CD
 // Patched method: KQ6Print::say
 static const uint16 kq6CDSignatureAudioTextSupport3[] = {
@@ -1676,9 +1738,13 @@ static const uint16 kq6CDPatchAudioTextSupport3[] = {
 	0x35, 0x01,                         // ldi 01
 	0x1a,                               // eq?
 	0x31, 0x10,                         // bnt [code to set property repressText to 1], adjusted
+	// waste 5 bytes instead of using myDialog class for now
+	// setting myDialog class all the time causes game over screens to misbehave (bug #9771)
+	0x34, 0x00, 0x00,
+	0x35, 0x00,
 	// use myDialog class, so that text box automatically disappears (this is not done for text only mode, like in the original)
-	0x72, 0x0e, 0x00,                   // lofsa myDialog
-	0x65, 0x12,                         // aTop dialog
+	//0x72, 0x0e, 0x00,                   // lofsa myDialog
+	//0x65, 0x12,                         // aTop dialog
 	// followed by original addText-calling code
 	0x38,
 	PATCH_GETORIGINALUINT16(+95),       // pushi (addText)
@@ -1869,6 +1935,7 @@ static const SciScriptPatcherEntry kq6Signatures[] = {
 	{  true,   481, "duplicate baby cry",                          1, kq6SignatureDuplicateBabyCry,             kq6PatchDuplicateBabyCry },
 	{  true,   907, "inventory stack fix",                         1, kq6SignatureInventoryStackFix,            kq6PatchInventoryStackFix },
 	{  true,    87, "Drink Me bottle fix",                         1, kq6SignatureDrinkMeFix,                   kq6PatchDrinkMeFix },
+	{  true,   640, "Tickets, only fix",                           1, kq6SignatureTicketsOnly,                  kq6PatchTicketsOnly },
 	// King's Quest 6 and Laura Bow 2 share basic patches for audio + text support
 	// *** King's Quest 6 audio + text support ***
 	{ false,   924, "CD: audio + text support KQ6&LB2 1",             1, kq6laurabow2CDSignatureAudioTextSupport1,     kq6laurabow2CDPatchAudioTextSupport1 },





More information about the Scummvm-git-logs mailing list