diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/intern.h | 2 | ||||
-rw-r--r-- | engines/scumm/script_v6.cpp | 35 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 2 |
3 files changed, 39 insertions, 0 deletions
diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 0fc6e3cfb4..3339780991 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -604,6 +604,8 @@ protected: int _curVerb; int _curVerbSlot; + bool _forcedWaitForMessage; + public: ScummEngine_v6(OSystem *syst, const DetectorResult &dr); diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index bc4c56428d..599d70f280 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -2372,11 +2372,46 @@ void ScummEngine_v6::o6_printEgo() { } void ScummEngine_v6::o6_talkActor() { + int offset = _scriptPointer - _scriptOrgPointer; + + // WORKAROUNDfor bug #896489: see below for detailed description + if (_forcedWaitForMessage) { + if (VAR(VAR_HAVE_MSG)) { + _scriptPointer--; + o6_breakHere(); + return; + } + + _forcedWaitForMessage = false; + _scriptPointer += resStrLen(_scriptPointer) + 1; + + return; + } + _actorToPrintStrFor = pop(); _string[0].loadDefault(); actorTalk(_scriptPointer); + // WORKAROUND for bug #896489: "DIG: Missing subtitles when talking to Brink" + // Original script does not have wait.waitForMessage() after several messages: + // + // [011A] (5D) if (getActorCostume(VAR_EGO) == 1) { + // [0126] (BA) talkActor("/STOP.008/Low out.",3) + // [013D] (A9) wait.waitForMessage() + // [013F] (5D) } else if (var227 == 0) { + // [014C] (BA) talkActor("/STOP.009/Never mind.",3) + // [0166] (73) } else { + // + // Here we simulate that opcode. + if (_game.id == GID_DIG && vm.slot[_currentScript].number == 88) { + if (offset == 0x158 || offset == 0x214 || offset == 0x231 || offset == 0x278) { + _forcedWaitForMessage = true; + _scriptPointer--; + + return; + } + } _scriptPointer += resStrLen(_scriptPointer) + 1; } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 8b0eb782fc..cea4ac3529 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -674,6 +674,8 @@ ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr) _curVerb = 0; _curVerbSlot = 0; + _forcedWaitForMessage = false; + VAR_VIDEONAME = 0xFF; VAR_RANDOM_NR = 0xFF; VAR_STRING2DRAW = 0xFF; |