From d2ae21624e0d8f58bfc3e2b67ab1b4efa94cf77d Mon Sep 17 00:00:00 2001 From: Adrian Frühwirth Date: Mon, 19 Mar 2018 21:36:13 +0100 Subject: TUCKER: Implement workaround for original script bug mentioned in commit 23fd97c99a --- engines/tucker/tucker.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'engines/tucker') diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index e1d05ecd83..f392526815 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -3460,6 +3460,27 @@ int TuckerEngine::executeTableInstruction() { return 1; case kCode_wsm: _stopActionOnPanelLock = true; + + // WORKAROUND + // Some versions have a script bug which allows you to freely click around + // during the sequence of Bud freeing the professor in part two which even + // allows Bud to leave the room while talking to the professor resulting in + // general glitchiness. The Spanish and Polish versions (and possibly others) + // fixed this by introducing the 'mof' opcode to disable the mouse during the + // sequence. + // + // The difference is as follows: + // Buggy: 61dw buw,148,125,wsm,buw,148,132,wsm,wat,050[...] + // Fixed: 61dw buw,148,125,wsm,buw,148,132,wsm,mof,pan,01,wat,050[...] + // ^^^^^^^^^^ + // To work around the issue in the problematic versions we inject these two + // instructions after the first occurence of the 'wsm' instruction (which + // proves good enough). + if (_locationNum == 24 && _nextAction == 61) { + setCursorState(kCursorStateDisabledHidden); + _panelType = kPanelTypeEmpty; + } + return 1; case kCode_wat: _stopActionCounter = readTableInstructionParam(3); -- cgit v1.2.3