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

m-kiewitz m_kiewitz at users.sourceforge.net
Wed Dec 21 02:04:23 CET 2016


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:
a46f3c1625 SCI: Fix kq6 CD audio+subtitle script patch


Commit: a46f3c162581740a3cad27e1168164ca91beb9c9
    https://github.com/scummvm/scummvm/commit/a46f3c162581740a3cad27e1168164ca91beb9c9
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-12-21T02:04:11+01:00

Commit Message:
SCI: Fix kq6 CD audio+subtitle script patch

Original patch caused a text window to be shown at the cliffs
(copy protection), even when audio-only mode was active.

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 dcefa21..0c4f0da 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1488,6 +1488,7 @@ 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.
 //  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
 //  Sadly PODialog is created during KQ6Print::addText, myDialog is set during
@@ -1514,13 +1515,34 @@ static const uint16 kq6CDSignatureAudioTextSupport3[] = {
 };
 
 static const uint16 kq6CDPatchAudioTextSupport3[] = {
-	0x31, 0x5c,                         // adjust jump to reuse audio mode addText-calling code
-	PATCH_ADDTOOFFSET(102),
-	0x48,                               // ret
-	0x48,                               // ret (waste byte)
+	0x31, 0x68,                         // adjust jump to reuse audio mode addText-calling code
+	PATCH_ADDTOOFFSET(+85),             // right at the MAGIC_DWORD
+	// check, if text is supposed to be shown. If yes, skip the follow-up check (param[1])
+	0x89, 0x5a,                         // lsg global[5Ah]
+	0x35, 0x01,                         // ldi 01
+	0x12,                               // and
+	0x2f, 0x07,                         // bt [skip over param check]
+	// original code, checks param[1]
+	0x8f, 0x01,                         // lsp param[1]
+	0x35, 0x01,                         // ldi 01
+	0x1a,                               // eq?
+	0x31, 0x10,                         // bnt [code to set property repressText to 1], adjusted
+	// 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
-	0x33, 0xed,                         // jump back to audio mode addText-calling code
+	// followed by original addText-calling code
+	0x38,
+	PATCH_GETORIGINALBYTE(+95),
+	PATCH_GETORIGINALBYTE(+96),         // pushi addText
+	0x78,                               // push1
+	0x8f, 0x02,                         // lsp param[2]
+	0x59, 0x03,                         // &rest 03
+	0x54, 0x06,                         // self 06
+	0x48,                               // ret
+
+	0x35, 0x01,                         // ldi 01
+	0x65, 0x2e,                         // aTop repressText
+	0x48,                               // ret
 	PATCH_END
 };
 





More information about the Scummvm-git-logs mailing list