diff options
author | Martin Kiewitz | 2013-12-21 23:54:35 +0100 |
---|---|---|
committer | Martin Kiewitz | 2013-12-21 23:54:35 +0100 |
commit | 68567ec2b166934d485ffe9826f5fd56818a786e (patch) | |
tree | c1bdbfae3bb3d851803220fecf499d722ec064f4 /engines/sci | |
parent | 5f699929c85bc14cbcba8197f58c71ec1ffe5d8e (diff) | |
download | scummvm-rg350-68567ec2b166934d485ffe9826f5fd56818a786e.tar.gz scummvm-rg350-68567ec2b166934d485ffe9826f5fd56818a786e.tar.bz2 scummvm-rg350-68567ec2b166934d485ffe9826f5fd56818a786e.zip |
SCI: improved one of the kq6 audio+text patches
KQPrint windows now get closed automatically when in audio+text mode
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index d040ec4e75..0e2b38bfbb 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -1079,21 +1079,38 @@ 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. +// 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 +// 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. // Patched method: KQ6Print::say -// Currently those windows wait for a mouse-click and don't close automatically static const uint16 kq6CDSignatureAudioTextSupport3[] = { + 0x31, 0x6e, // bnt [to text code] + SIG_ADDTOOFFSET(+85), SIG_MAGICDWORD, 0x8f, 0x01, // lsp param[1] 0x35, 0x01, // ldi 01 0x1a, // eq? 0x31, 0x0c, // bnt [code to set property repressText to 1] 0x38, // pushi (selector addText) + SIG_ADDTOOFFSET(+9), // skip addText-calling code + 0x33, 0x10, // jmp [to ret] + 0x35, 0x01, // ldi 01 + 0x65, 0x2e, // aTop repressText + 0x33, 0x0a, // jmp [to ret] SIG_END }; static const uint16 kq6CDPatchAudioTextSupport3[] = { - PATCH_ADDTOOFFSET(+5), - 0x18, 0x18, // not (waste bytes) + 0x31, 0x5c, // adjust jump to reuse audio mode addText-calling code + PATCH_ADDTOOFFSET(102), + 0x48, // ret + 0x48, // waste byte + 0x72, 0x0e, 0x00, // lofsa myDialog + 0x65, 0x12, // aTop dialog + 0x33, 0xed, // jump back to audio mode addText-calling code PATCH_END }; |