[Scummvm-cvs-logs] scummvm master -> 343f1c7f8b89a5e0445f3c3f6af18700be407362

m-kiewitz m_kiewitz at users.sourceforge.net
Tue Mar 8 01:29:26 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:
343f1c7f8b SCI: Script patch for ending glitch in multilingual kq5


Commit: 343f1c7f8b89a5e0445f3c3f6af18700be407362
    https://github.com/scummvm/scummvm/commit/343f1c7f8b89a5e0445f3c3f6af18700be407362
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-03-08T01:29:46+01:00

Commit Message:
SCI: Script patch for ending glitch in multilingual kq5

Game hangs during the magic battle during the ending.
Happened in all multilingual versions because of a script bug
(scripts were waiting for a signal, music didn't set one)
Fixes French, German and Spanish versions of KQ5
Also happened, when using the original interpreter

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 fc0dca5..8039c5f 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -813,6 +813,32 @@ static const uint16 kq5PatchWitchCageInit[] = {
 	PATCH_END
 };
 
+// The multilingual releases of KQ5 hang right at the end during the magic battle with Mordack.
+// It seems additional code was added to wait for signals, but the signals are never set and thus
+// the game hangs. We disable that code, so that the battle works again.
+// This also happened in the original interpreter.
+// We must not change similar code, that happens before.
+
+// Applies to at least: French PC floppy, German PC floppy, Spanish PC floppy
+// Responsible method: stingScript::changeState, dragonScript::changeState, snakeScript::changeState
+static const uint16 kq5SignatureMultilingualEndingGlitch[] = {
+	SIG_MAGICDWORD,
+	0x89, 0x57,                      // lsg global[57h]
+	0x35, 0x00,                      // ldi 0
+	0x1a,                            // eq?
+	0x18,                            // not
+	0x30, SIG_UINT16(0x0011),        // bnt [skip signal check]
+	SIG_ADDTOOFFSET(+8),             // skip globalSound::prevSignal get code
+	0x36,                            // push
+	0x35, 0x0a,                      // ldi 0Ah
+	SIG_END
+};
+
+static const uint16 kq5PatchMultilingualEndingGlitch[] = {
+	PATCH_ADDTOOFFSET(+6),
+	0x32,                            // change BNT into JMP
+	PATCH_END
+};
 
 // In the final battle, the DOS version uses signals in the music to handle
 // timing, while in the Windows version another method is used and the GM
@@ -843,9 +869,10 @@ static const uint16 kq5PatchWinGMSignals[] = {
 
 //          script, description,                                      signature                  patch
 static const SciScriptPatcherEntry kq5Signatures[] = {
-	{  true,     0, "CD: harpy volume change",                     1, kq5SignatureCdHarpyVolume, kq5PatchCdHarpyVolume },
-	{  true,   200, "CD: witch cage init",                         1, kq5SignatureWitchCageInit, kq5PatchWitchCageInit },
-	{ false,   124, "Win: GM Music signal checks",                 4, kq5SignatureWinGMSignals, kq5PatchWinGMSignals },
+	{  true,     0, "CD: harpy volume change",                     1, kq5SignatureCdHarpyVolume,            kq5PatchCdHarpyVolume },
+	{  true,   200, "CD: witch cage init",                         1, kq5SignatureWitchCageInit,            kq5PatchWitchCageInit },
+	{  true,   124, "Multilingual: Ending glitching out",          3, kq5SignatureMultilingualEndingGlitch, kq5PatchMultilingualEndingGlitch },
+	{ false,   124, "Win: GM Music signal checks",                 4, kq5SignatureWinGMSignals,             kq5PatchWinGMSignals },
 	SCI_SIGNATUREENTRY_TERMINATOR
 };
 






More information about the Scummvm-git-logs mailing list