diff options
Diffstat (limited to 'engines/sci/engine/script_patches.cpp')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 8bbbd713a6..03cd1d06e9 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -1214,6 +1214,26 @@ static const uint16 kq6CDPatchAudioTextSupportGirlInTheTower[] = { PATCH_END }; +// Fixes dual mode for scenes with Azure and Ariel (room 370) +// Effectively same patch as the one for fixing "Girl In The Tower" +// Applies to at least: PC-CD +// Patched methods: rm370::init, caughtAtGateCD::changeState, caughtAtGateTXT::changeState, toLabyrinth::changeState +// Fixes bug: #6750 +static const uint16 kq6CDSignatureAudioTextSupportAzureAriel[] = { + SIG_MAGICDWORD, + 0x89, 0x5a, // lsg global[5a] + 0x35, 0x02, // ldi 02 + 0x1a, // eq? + 0x31, // bnt [jump-for-text-code] + SIG_END +}; + +static const uint16 kq6CDPatchAudioTextSupportAzureAriel[] = { + PATCH_ADDTOOFFSET(+4), + 0x12, // and + PATCH_END +}; + // Additional patch specifically for King's Quest 6 // Adds another button state for the text/audio button. We currently use the "speech" view for "dual" mode. // View 947, loop 9, cel 0+1 -> "text" @@ -1306,6 +1326,7 @@ static const SciScriptPatcherEntry kq6Signatures[] = { { false, 1009, "CD: audio + text support KQ6 Guards", 2, kq6CDSignatureAudioTextSupportGuards, kq6CDPatchAudioTextSupportGuards }, { false, 1027, "CD: audio + text support KQ6 Stepmother", 1, kq6CDSignatureAudioTextSupportStepmother, kq6CDPatchAudioTextSupportJumpAlways }, { false, 740, "CD: audio + text support KQ6 Girl In The Tower", 1, kq6CDSignatureAudioTextSupportGirlInTheTower, kq6CDPatchAudioTextSupportGirlInTheTower }, + { false, 370, "CD: audio + text support KQ6 Azure & Ariel", 6, kq6CDSignatureAudioTextSupportAzureAriel, kq6CDPatchAudioTextSupportAzureAriel }, { false, 903, "CD: audio + text support KQ6 menu", 1, kq6CDSignatureAudioTextMenuSupport, kq6CDPatchAudioTextMenuSupport }, SCI_SIGNATUREENTRY_TERMINATOR }; @@ -1917,6 +1938,43 @@ static const SciScriptPatcherEntry pq1vgaSignatures[] = { }; // =========================================================================== +// At the healer's house there is a bird's nest up on the tree. +// The player can throw rocks at it until it falls to the ground. +// The hero will then grab the item, that is in the nest. +// +// When running is active, the hero will not reach the actual destination +// and because of that, the game will get stuck. +// +// We just change the coordinate of the destination slightly, so that walking, +// sneaking and running work. +// +// This bug was fixed by Sierra at least in the Japanese PC-9801 version. +// Applies to at least: English floppy (1.000, 1.012) +// Responsible method: pickItUp::changeState (script 54) +// Fixes bug: #6407 +static const uint16 qfg1egaSignatureThrowRockAtNest[] = { + 0x4a, 0x04, // send 04 (nest::x) + 0x36, // push + SIG_MAGICDWORD, + 0x35, 0x0f, // ldi 0f (15d) + 0x02, // add + 0x36, // push + SIG_END +}; + +static const uint16 qfg1egaPatchThrowRockAtNest[] = { + PATCH_ADDTOOFFSET(+3), + 0x35, 0x12, // ldi 12 (18d) + PATCH_END +}; + +// script, description, signature patch +static const SciScriptPatcherEntry qfg1egaSignatures[] = { + { true, 54, "throw rock at nest while running", 1, qfg1egaSignatureThrowRockAtNest, qfg1egaPatchThrowRockAtNest }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +// =========================================================================== // script 215 of qfg1vga pointBox::doit actually processes button-presses // during fighting with monsters. It strangely also calls kGetEvent. Because // the main User::doit also calls kGetEvent it's pure luck, where the event @@ -3036,6 +3094,9 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3 case GID_PQ1: signatureTable = pq1vgaSignatures; break; + case GID_QFG1: + signatureTable = qfg1egaSignatures; + break; case GID_QFG1VGA: signatureTable = qfg1vgaSignatures; break; |