[Scummvm-git-logs] scummvm master -> 4a7248627906ca34a45118d65bd0e51656f6421c
sluicebox
22204938+sluicebox at users.noreply.github.com
Sun Dec 13 20:55:37 UTC 2020
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:
4a72486279 SCI: Disable LSL3 speed test
Commit: 4a7248627906ca34a45118d65bd0e51656f6421c
https://github.com/scummvm/scummvm/commit/4a7248627906ca34a45118d65bd0e51656f6421c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-12-13T10:54:36-10:00
Commit Message:
SCI: Disable LSL3 speed test
Fixes bug #11967
Changed paths:
engines/sci/engine/kmisc.cpp
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 182a7bebbc..53735241b4 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -115,15 +115,6 @@ reg_t kGameIsRestarting(EngineState *s, int argc, reg_t *argv) {
}
break;
}
- case GID_LSL3:
- // LSL3 calculates a machinespeed variable during game startup
- // (right after the filthy questions). This one would go through w/o
- // throttling resulting in having to do 1000 pushups or something. Another
- // way of handling this would be delaying incrementing of "machineSpeed"
- // selector.
- if (s->currentRoomNumber() == 290)
- s->_throttleTrigger = true;
- break;
case GID_SQ4:
// In SQ4 (floppy and CD) the sequel police appear way too quickly in
// the Skate-o-rama rooms, resulting in all sorts of timer issues, like
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 01ed36b011..6530cb9104 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -7162,6 +7162,34 @@ static const SciScriptPatcherEntry larry2Signatures[] = {
// ===========================================================================
// Leisure Suit Larry 3
+// Disable the LSL3 speed test by always setting the machine speed to 40 (PC AT)
+// so that all graphics are enabled and the weight room behaves reasonably.
+// 40 is the minimum value that enables everything such as incrementing the
+// score and the lighting effects in rooms 390, 430, and 431. The weight room
+// (room 380) uses the machine speed to calculate how many exercises are
+// required and the results would be much too high (in the thousands) if the
+// speed test were to run unthrottled at modern speeds.
+//
+// Applies to: All versions
+// Responsible method: rm290:doit
+// Fixes bug: #11967
+static const uint16 larry3SignatureSpeedTest[] = {
+ SIG_MAGICDWORD,
+ 0x8b, 0x00, // lsl 00
+ 0x76, // push0
+ 0x43, SIG_ADDTOOFFSET(+1), 0x00, // callk GetTime 00
+ 0x22, // lt? [ is speed test complete? ]
+ 0x30, // bnt
+ SIG_END
+};
+
+static const uint16 larry3PatchSpeedTest[] = {
+ 0x35, 0x28, // ldi 28
+ 0xa1, 0x7b, // sag 7b [ machine speed = 40 ]
+ 0x33, 0x04, // jmp 04 [ complete speed test ]
+ PATCH_END
+};
+
// The LSL3 volume dialog initialize its slider to the current volume by calling
// kDoSoundMasterVolume, but it passes an uninitialized variable as an extra
// parameter. This changes the volume instead of just querying it, leaving the
@@ -7195,6 +7223,7 @@ static const uint16 larry3PatchVolumeSlider[] = {
// script, description, signature patch
static const SciScriptPatcherEntry larry3Signatures[] = {
+ { true, 290, "disable speed test", 1, larry3SignatureSpeedTest, larry3PatchSpeedTest },
{ true, 997, "fix volume slider", 1, larry3SignatureVolumeSlider, larry3PatchVolumeSlider },
SCI_SIGNATUREENTRY_TERMINATOR
};
More information about the Scummvm-git-logs
mailing list