aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorsluicebox2019-12-28 01:52:30 -0800
committersluicebox2019-12-28 13:44:00 -0800
commitff855fe99cb6fed2a1ecc402baee12c94eef0532 (patch)
tree55e358a18ac505048b47e27906347410d89a0969 /engines/sci
parent552dc1321f273f61062aecc594fa52787983e1b1 (diff)
downloadscummvm-rg350-ff855fe99cb6fed2a1ecc402baee12c94eef0532.tar.gz
scummvm-rg350-ff855fe99cb6fed2a1ecc402baee12c94eef0532.tar.bz2
scummvm-rg350-ff855fe99cb6fed2a1ecc402baee12c94eef0532.zip
SCI32: Fix SQ6 duplicate points
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script_patches.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 7ec394bffa..2bedc08c8d 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -17303,6 +17303,33 @@ static const uint16 sq6HookahHosePointPatch[] = {
PATCH_END
};
+// Filling the helmet in room 690 awards three points, but this happens every
+// time the player returns to fill the helmet with no limit. We fix this by
+// associating the points with flag 297 so that they're only awarded once, as
+// Sierra did in the French, German, and Mac versions.
+//
+// Applies to: English PC
+// Responsible method: sGetStuff:changeState(8)
+static const uint16 sq6DuplicatePointsSignature[] = {
+ SIG_MAGICDWORD,
+ 0x39, SIG_SELECTOR8(points), // pushi points
+ 0x78, // push1
+ 0x39, 0x03, // pushi 03
+ 0x81, 0x01, // lag 01
+ 0x4a, SIG_UINT16(0x0006), // send 06 [ SQ6 points: 3 ]
+ 0x7e, // line
+ SIG_END
+};
+
+static const uint16 sq6DuplicatePointsPatch[] = {
+ PATCH_ADDTOOFFSET(+2),
+ 0x7a, // push2
+ PATCH_ADDTOOFFSET(+4),
+ 0x38, PATCH_UINT16(0x0129), // pushi 0129
+ 0x4a, PATCH_UINT16(0x0008), // send 08 [ SQ6 points: 3 297 ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry sq6Signatures[] = {
{ true, 0, "fix slow transitions", 1, sq6SlowTransitionSignature2, sq6SlowTransitionPatch2 },
@@ -17315,6 +17342,7 @@ static const SciScriptPatcherEntry sq6Signatures[] = {
{ true, 460, "fix invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 500, "fix slow transitions", 1, sq6SlowTransitionSignature1, sq6SlowTransitionPatch1 },
{ true, 510, "fix invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
+ { true, 690, "fix duplicate points", 1, sq6DuplicatePointsSignature, sq6DuplicatePointsPatch },
{ true, 64908, "disable video benchmarking", 1, sq6BenchmarkSignature, sci2BenchmarkPatch },
{ true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
{ true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },