[Scummvm-git-logs] scummvm master -> 7bd9f0b81b74acfd8340cfd6cfa8c4b3ad851ee7
sluicebox
noreply at scummvm.org
Mon Jul 22 19:47:58 UTC 2024
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:
7bd9f0b81b SCI: Fix CAMELOT empty purse message
Commit: 7bd9f0b81b74acfd8340cfd6cfa8c4b3ad851ee7
https://github.com/scummvm/scummvm/commit/7bd9f0b81b74acfd8340cfd6cfa8c4b3ad851ee7
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-07-22T12:42:40-07:00
Commit Message:
SCI: Fix CAMELOT empty purse message
Fixes bug #15288
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 37d9dc442a1..b0881f7b60f 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1170,10 +1170,53 @@ static const uint16 camelotPatchSwordEvents[] = {
PATCH_END
};
+// After viewing the purse with "count money" or several other commands, the game
+// always displays a message saying that the purse is empty, even when it isn't.
+// ARTHUR:handleEvent incorrectly tests the return value of the purse function
+// instead of also testing the three money globals.
+//
+// We fix this by only displaying the empty-purse message when all of the money
+// globals are zero.
+//
+// Applies to: All versions
+// Responsible method: ARTHUR:handleEvent
+// Fixes bug: #15288
+static const uint16 camelotSignaturePurseMessages[] = {
+ 0x18, // not
+ 0x30, SIG_UINT16(0x0014), // bnt 0014 [ selected money ]
+ 0x7a, // push2
+ 0x38, SIG_UINT16(0x0320), // pushi 0320
+ 0x7a, // push2
+ SIG_MAGICDWORD,
+ 0x39, 0x1d, // pushi 1d
+ 0x39, 0x22, // pushi 22
+ 0x43, 0x40, 0x04, // callk Random 04
+ 0x36, // push
+ 0x47, 0xff, 0x00, 0x04, // calle Print [ empty-purse message ]
+ 0x32, SIG_UINT16(0x0011), // jmp 0011 [ cleanup ]
+ SIG_ADDTOOFFSET(+9),
+ 0x43, 0x40, 0x04, // callk Random 04
+ SIG_END
+};
+
+static const uint16 camelotPatchPurseMessages[] = {
+ 0x2f, 0x16, // bt 16 [ selected money ]
+ 0x89, 0x7a, // lsg 7a [ gold ]
+ 0x81, 0x79, // lag 79 [ silver ]
+ 0x14, // or
+ 0x89, 0x78, // lsg 78 [ copper ]
+ 0x14, // or
+ 0x2f, 0x1d, // bt 1d [ skip empty-purse message ]
+ PATCH_GETORIGINALBYTES(4, 9), // [ prepare empty-purse message ]
+ 0x32, PATCH_UINT16(0x0009), // jmp 0009 [ callk Random / calle Print ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry camelotSignatures[] = {
{ true, 0, "fix sword sheathing", 1, camelotSignatureSwordSheathing, camelotPatchSwordSheathing },
{ true, 0, "fix sword events", 1, camelotSignatureSwordEvents, camelotPatchSwordEvents },
+ { true, 0, "fix purse messages", 1, camelotSignaturePurseMessages, camelotPatchPurseMessages },
{ true, 11, "fix hunter missing points", 1, camelotSignatureHunterMissingPoints, camelotPatchHunterMissingPoints },
{ true, 62, "fix peepingTom Sierra bug", 1, camelotSignaturePeepingTom, camelotPatchPeepingTom },
{ true, 64, "fix Fatima room messages", 2, camelotSignatureFatimaRoomMessages, camelotPatchFatimaRoomMessages },
More information about the Scummvm-git-logs
mailing list