aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-22 00:20:00 +0000
committerFilippos Karapetis2010-11-22 00:20:00 +0000
commitd8afddac634a089fd75f1c51a49b7ee1a2929401 (patch)
tree0313e2d3dd5b2b4ed768302ec48ccbf265736e08 /engines/sci/engine
parent0b06a1fe7b8295ab1c26c9a76ec2e5a3b2716638 (diff)
downloadscummvm-rg350-d8afddac634a089fd75f1c51a49b7ee1a2929401.tar.gz
scummvm-rg350-d8afddac634a089fd75f1c51a49b7ee1a2929401.tar.bz2
scummvm-rg350-d8afddac634a089fd75f1c51a49b7ee1a2929401.zip
SCI: Patched the QFG3 character import screen the same way as with QFG2
This prevents random crashes and slow refreshing, same as with QFG2 svn-id: r54414
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/script_patches.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 6a9035103e..84e8c4759e 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -747,7 +747,34 @@ const uint16 qfg2PatchImportDialog[] = {
// script, description, magic DWORD, adjust
const SciScriptSignature qfg2Signatures[] = {
- { 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x20, 0x30, 0x0b, 0x00), -1, qfg2SignatureImportDialog, qfg2PatchImportDialog },
+ { 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x20, 0x30, 0x0b, 0x00), -1, qfg2SignatureImportDialog, qfg2PatchImportDialog },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
+// Patch for the import screen in QFG3, same as the one for QFG2 above
+const byte qfg3SignatureImportDialog[] = {
+ 15,
+ 0x63, 0x2a, // pToa text
+ 0x31, 0x0b, // bnt [next state]
+ 0x7a, // push2
+ 0x39, 0x03, // pushi 03
+ 0x36, // push
+ 0x43, 0x72, 0x04, // callk Memory 4
+ 0x35, 0x00, // ldi 00
+ 0x65, 0x2a, // aTop text
+ 0
+};
+
+const uint16 qfg3PatchImportDialog[] = {
+ PATCH_ADDTOOFFSET | +4,
+ 0x48, // ret
+ PATCH_END
+};
+
+// script, description, magic DWORD, adjust
+const SciScriptSignature qfg3Signatures[] = {
+ { 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a), -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -975,6 +1002,9 @@ void Script::matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uin
case GID_QFG2:
signatureTable = qfg2Signatures;
break;
+ case GID_QFG3:
+ signatureTable = qfg3Signatures;
+ break;
case GID_SQ4:
signatureTable = sq4Signatures;
break;