aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2016-10-27 10:55:09 -0500
committerColin Snover2016-10-27 10:55:30 -0500
commitc30380d0a3fc8f9a04825d5adab183d54276358f (patch)
tree6516b968f63be5539cdc156b532e1edb1bcce7d1 /engines/sci
parent09d41af771edbb942eea78dcc89ab86c3d05abca (diff)
downloadscummvm-rg350-c30380d0a3fc8f9a04825d5adab183d54276358f.tar.gz
scummvm-rg350-c30380d0a3fc8f9a04825d5adab183d54276358f.tar.bz2
scummvm-rg350-c30380d0a3fc8f9a04825d5adab183d54276358f.zip
SCI32: Fix LSL6hires script bug
Fixes Trac#9612.
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script_patches.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 5ac4b758ba..be9634452f 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2190,8 +2190,27 @@ static const SciScriptPatcherEntry larry6Signatures[] = {
#pragma mark -
#pragma mark Leisure Suit Larry 6 Hires
+// When entering room 270 (diving board) from room 230, a 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.
+static const uint16 larry6HiresSignatureSetScale[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_UINT16(0x14b), // pushi 014b (setStyle)
+ 0x38, SIG_UINT16(0x05), // pushi 0005
+ 0x51, 0x2c, // class 2c (Styler)
+ SIG_END
+};
+
+static const uint16 larry6HiresPatchSetScale[] = {
+ 0x38, SIG_UINT16(0x14f), // pushi 014f (setStyler)
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry larry6HiresSignatures[] = {
+ { true, 270, "fix incorrect setScale call", 1, larry6HiresSignatureSetScale, larry6HiresPatchSetScale },
{ true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
{ true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
{ true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },