[Scummvm-cvs-logs] scummvm master -> 3ea76f39f90e4bfa6fab7f1021a5614d70b5571d
lskovlun
lskovlun at sprogklog.dk
Sat Apr 2 19:56:10 CEST 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:
3ea76f39f9 SCI: Fix SQ1 droid zapping issue with a script patch, thanks to
Commit: 3ea76f39f90e4bfa6fab7f1021a5614d70b5571d
https://github.com/scummvm/scummvm/commit/3ea76f39f90e4bfa6fab7f1021a5614d70b5571d
Author: Lars Skovlund (lskovlun at sprogklog.dk)
Date: 2011-04-02T10:54:53-07:00
Commit Message:
SCI: Fix SQ1 droid zapping issue with a script patch, thanks to
dhewg for reporting.
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 33e62b2..54ae88a 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -994,6 +994,53 @@ const SciScriptSignature sq4Signatures[] = {
SCI_SIGNATUREENTRY_TERMINATOR
};
+const byte sq1vgaSignatureEgoShowsCard[] = {
+ 25,
+ 0x38, 0x46, 0x02, // push 0x246 (set up send frame to set timesShownID)
+ 0x78, // push1
+ 0x38, 0x46, 0x02, // push 0x246 (set up send frame to get timesShownID)
+ 0x76, // push0
+ 0x51, 0x7c, // class DeltaurRegion
+ 0x4a, 0x04, // send 0x04 (get timesShownID)
+ 0x36, // push
+ 0x35, 0x01, // ldi 1
+ 0x02, // add
+ 0x36, // push
+ 0x51, 0x7c, // class DeltaurRegion
+ 0x4a, 0x06, // send 0x06 (set timesShownID)
+ 0x36, // push (wrong, acc clobbered by class, above)
+ 0x35, 0x03, // ldi 0x03
+ 0x22, // lt?
+ 0};
+
+// Note that this script patch is merely a reordering of the
+// instructions in the original script.
+const uint16 sq1vgaPatchEgoShowsCard[] = {
+ 0x38, 0x46, 0x02, // push 0x246 (set up send frame to get timesShownID)
+ 0x76, // push0
+ 0x51, 0x7c, // class DeltaurRegion
+ 0x4a, 0x04, // send 0x04 (get timesShownID)
+ 0x36, // push
+ 0x35, 0x01, // ldi 1
+ 0x02, // add
+ 0x36, // push (this push corresponds to the wrong one above)
+ 0x38, 0x46, 0x02, // push 0x246 (set up send frame to set timesShownID)
+ 0x78, // push1
+ 0x36, // push
+ 0x51, 0x7c, // class DeltaurRegion
+ 0x4a, 0x06, // send 0x06 (set timesShownID)
+ 0x35, 0x03, // ldi 0x03
+ 0x22, // lt?
+ PATCH_END};
+
+
+// script, description, magic DWORD, adjust
+const SciScriptSignature sq1vgaSignatures[] = {
+ { 58, "Sarien armory droid zapping ego first time", 1, PATCH_MAGICDWORD( 0x72, 0x88, 0x15, 0x36 ), -70,
+ sq1vgaSignatureEgoShowsCard, sq1vgaPatchEgoShowsCard },
+
+ SCI_SIGNATUREENTRY_TERMINATOR};
+
// will actually patch previously found signature area
void Script::applyPatch(const uint16 *patch, byte *scriptData, const uint32 scriptSize, int32 signatureOffset) {
byte orgData[PATCH_VALUELIMIT];
@@ -1128,6 +1175,9 @@ void Script::matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uin
case GID_QFG3:
signatureTable = qfg3Signatures;
break;
+ case GID_SQ1:
+ signatureTable = sq1vgaSignatures;
+ break;
case GID_SQ4:
signatureTable = sq4Signatures;
break;
More information about the Scummvm-git-logs
mailing list