[Scummvm-cvs-logs] scummvm master -> 9dd5ee988b5a8f090e5e7272218070593edde9aa

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Jul 11 19:03:57 CEST 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:
9dd5ee988b SCI32: Improve kq7 subtitle script patch


Commit: 9dd5ee988b5a8f090e5e7272218070593edde9aa
    https://github.com/scummvm/scummvm/commit/9dd5ee988b5a8f090e5e7272218070593edde9aa
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-07-11T19:04:18+02:00

Commit Message:
SCI32: Improve kq7 subtitle script patch

Subtitle box should now always use color 255, which should be
white all the time. Normally it uses color 7, which is white
most of the time, but for example pink/purple at the start of
chapter 5.

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 88bb975..0d30372 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1477,10 +1477,13 @@ static const SciScriptPatcherEntry kq6Signatures[] = {
 // The scripts also put the regular text in the middle of the screen, blocking
 // animations.
 //
+// And for certain rooms, the subtitle box may use another color
+// like for example pink/purple at the start of chapter 5.
+//
 // We fix all of that (hopefully - lots of testing is required).
 // We put the text at the bottom of the play screen.
-// And we also make the scripts use the regular KQTalker instead of KQNarrator.
-//
+// We also make the scripts use the regular KQTalker instead of KQNarrator.
+// And we also make the subtitle box use color 255, which is fixed white.
 //
 // Applies to at least: PC CD 1.51 English, 1.51 German, 2.00 English
 // Patched method: KQNarrator::init (script 31)
@@ -1557,10 +1560,56 @@ static const uint16 kq7PatchSubtitleFix2[] = {
 	PATCH_END
 };
 
+// Applies to at least: PC CD 1.51 English, 1.51 German, 2.00 English
+// Patched method: Narrator::say (script 64928)
+static const uint16 kq7SignatureSubtitleFix3[] = {
+	SIG_MAGICDWORD,
+	0x63, 0x28,                         // pToa initialized
+	0x18,                               // not
+	0x31, 0x07,                         // bnt [skip init code]
+	0x38, SIG_ADDTOOFFSET(+2),          // pushi init (008Eh for 2.00, 0093h for 1.51)
+	0x76,                               // push0
+	0x54, SIG_UINT16(0x0004),           // self 04
+	// end of init code
+	0x8f, 0x00,                         // lsp param[0]
+	0x35, 0x01,                         // ldi 01
+	0x1e,                               // gt?
+	0x31, 0x08,                         // bnt [set acc to 0]
+	0x87, 0x02,                         // lap param[2]
+	0x31, 0x04,                         // bnt [set acc to 0]
+	0x87, 0x02,                         // lap param[2]
+	0x33, 0x02,                         // jmp [over set acc to 0 code]
+	0x35, 0x00,                         // ldi 00
+	0x65, 0x18,                         // aTop caller
+	SIG_END
+};
+
+static const uint16 kq7PatchSubtitleFix3[] = {
+	PATCH_ADDTOOFFSET(+2),              // skip over "pToa initialized code"
+	0x2f, 0x0c,                         // bt [skip init code] - saved 1 byte
+	0x38, 
+	PATCH_GETORIGINALBYTE(+6),
+	PATCH_GETORIGINALBYTE(+7),          // pushi (init)
+	0x76,                               // push0
+	0x54, PATCH_UINT16(0x0004),           // self 04
+	// additionally set background color here (5 bytes)
+	0x34, PATCH_UINT16(255),            // pushi 255d
+	0x65, 0x2e,                         // aTop back
+	// end of init code
+	0x8f, 0x00,                         // lsp param[0]
+	0x35, 0x01,                         // ldi 01 - this may get optimized to get another byte
+	0x1e,                               // gt?
+	0x31, 0x04,                         // bnt [set acc to 0]
+	0x87, 0x02,                         // lap param[2]
+	0x2f, 0x02,                         // bt [over set acc to 0 code]
+	PATCH_END
+};
+
 //          script, description,                                      signature                                 patch
 static const SciScriptPatcherEntry kq7Signatures[] = {
-	{  true,    31, "subtitle fix 1/2",                            1, kq7SignatureSubtitleFix1,                 kq7PatchSubtitleFix1 },
-	{  true, 64928, "subtitle fix 2/2",                            1, kq7SignatureSubtitleFix2,                 kq7PatchSubtitleFix2 },
+	{  true,    31, "subtitle fix 1/3",                            1, kq7SignatureSubtitleFix1,                 kq7PatchSubtitleFix1 },
+	{  true, 64928, "subtitle fix 2/3",                            1, kq7SignatureSubtitleFix2,                 kq7PatchSubtitleFix2 },
+	{  true, 64928, "subtitle fix 3/3",                            1, kq7SignatureSubtitleFix3,                 kq7PatchSubtitleFix3 },
 	SCI_SIGNATUREENTRY_TERMINATOR
 };
 






More information about the Scummvm-git-logs mailing list