[Scummvm-cvs-logs] scummvm master -> 4766774b3dbd8824276ad7ff2e3c916b6dc1de37
bluegr
md5 at scummvm.org
Mon Feb 21 19:44:50 CET 2011
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:
4766774b3d SCI: Fixed script bug #3040722 in QFG3
Commit: 4766774b3dbd8824276ad7ff2e3c916b6dc1de37
https://github.com/scummvm/scummvm/commit/4766774b3dbd8824276ad7ff2e3c916b6dc1de37
Author: md5 (md5 at scummvm.org)
Date: 2011-02-21T10:43:54-08:00
Commit Message:
SCI: Fixed script bug #3040722 in QFG3
Changed paths:
engines/sci/engine/script_patches.cpp
engines/sci/engine/vm.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 5191887..79a0cfc 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -928,9 +928,26 @@ const uint16 qfg3PatchWindowDispose[] = {
PATCH_END
};
+// Script 23 in QFG3 has a typo/bug which makes it loop endlessly and
+// read garbage. Fixes bug #3040722.
+const byte qfg3DialogCrash[] = {
+ 5,
+ 0x34, 0xe7, 0x03, // ldi 3e7 (999)
+ 0x22, // lt?
+ 0x33, // jmp [back] ---> BUG! Infinite loop
+};
+
+const uint16 qfg3PatchDialogCrash[] = {
+ 0x34, 0xe7, 0x03, // ldi 3e7 (999)
+ 0x22, // lt?
+ 0x31, // bnt [back]
+ PATCH_END
+};
+
// script, description, magic DWORD, adjust
const SciScriptSignature qfg3Signatures[] = {
{ 22, "window dispose", 1, PATCH_MAGICDWORD(0x39, 0x05, 0x39, 0x0d), 0, qfg3WindowDispose, qfg3PatchWindowDispose },
+ { 23, "dialog crash", 1, PATCH_MAGICDWORD(0xe7, 0x03, 0x22, 0x33), -1, qfg3DialogCrash, qfg3PatchDialogCrash },
{ 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a), -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
SCI_SIGNATUREENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 69d046d..a70ff5a 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -935,7 +935,7 @@ void run_vm(EngineState *s) {
byte extOpcode;
s->xs->addr.pc.offset += readPMachineInstruction(scr->getBuf() + s->xs->addr.pc.offset, extOpcode, opparams);
const byte opcode = extOpcode >> 1;
- //debug("%s", opcodeNames[opcode]);
+ //debug("%s: %d, %d, %d, %d, acc = %04x:%04x", opcodeNames[opcode], opparams[0], opparams[1], opparams[2], opparams[3], PRINT_REG(s->r_acc));
switch (opcode) {
More information about the Scummvm-git-logs
mailing list