aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2018-10-23 01:55:00 +0300
committerFilippos Karapetis2018-10-23 01:55:00 +0300
commit3a8936ea5ca3fb2bc44d1179c883c1030a2bff39 (patch)
tree0c0089af0108288f5c0c32ba257db62a528b4265 /engines
parentef841f615e558fe2f51301712da03072e9194033 (diff)
downloadscummvm-rg350-3a8936ea5ca3fb2bc44d1179c883c1030a2bff39.tar.gz
scummvm-rg350-3a8936ea5ca3fb2bc44d1179c883c1030a2bff39.tar.bz2
scummvm-rg350-3a8936ea5ca3fb2bc44d1179c883c1030a2bff39.zip
SCI32: Fix a script bug (typo) in Hoyle 5 - Old Maid
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/script_patches.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 97564b840e..6244ef95ba 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -910,6 +910,25 @@ static const uint16 hoyle5PatchSpinLoop[] = {
PATCH_END
};
+// While playing Old Maid (room 200), a repeated typo in the game script
+// means that `setScale` is called accidentally instead of `setScaler`.
+// In SSCI this did not do much because the first argument happened to be
+// smaller than the y-position of `ego`, but in ScummVM the first argument is
+// larger and so a debug message "y value less than vanishingY" is displayed.
+// This is the same issue as with LSL6 hires.
+static const uint16 hoyle5SetScaleSignature[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(setScale), // pushi $14b (setScale)
+ 0x38, SIG_UINT16(0x05), // pushi 5
+ 0x51, 0x2c, // class 2c (Scaler)
+ SIG_END
+};
+
+static const uint16 hoyle5PatchSetScale[] = {
+ 0x38, PATCH_SELECTOR16(setScaler), // pushi $14f (setScaler)
+ PATCH_END
+};
+
// There are two derived collections of Hoyle Classic Games:
// 1) The Hoyle Children's Collection, which includes the following games:
// - Crazy Eights (script 100)
@@ -1058,6 +1077,7 @@ static const uint16 hoyle5PatchDisableGame[] = {
static const SciScriptPatcherEntry hoyle5Signatures[] = {
{ true, 3, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 23, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
+ { true, 200, "fix setScale calls", 11, hoyle5SetScaleSignature, hoyle5PatchSetScale },
{ true, 500, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 64937, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 64908, "disable video benchmarking", 1, sci2BenchmarkSignature, sci2BenchmarkPatch },
@@ -1068,6 +1088,7 @@ static const SciScriptPatcherEntry hoyle5Signatures[] = {
static const SciScriptPatcherEntry hoyle5ChildrensCollectionSignatures[] = {
{ true, 3, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 23, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
+ { true, 200, "fix setScale calls", 11, hoyle5SetScaleSignature, hoyle5PatchSetScale },
{ true, 500, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 64937, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 64908, "disable video benchmarking", 1, sci2BenchmarkSignature, sci2BenchmarkPatch },