From d8bbcd9211bb1d3373b49c22e85482d844cc1135 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 30 Apr 2008 12:54:07 +0000 Subject: Fix subtitle regressions in The Dig. svn-id: r31788 --- engines/scumm/actor.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 1eefea4fc9..63718fbb5a 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1863,8 +1863,12 @@ void ScummEngine_v7::actorTalk(const byte *msg) { // Play associated speech, if any playSpeech((byte *)_lastStringTag); - if ((_game.version == 7 && !_keepText) || (_game.version == 8 && VAR(VAR_HAVE_MSG))) { - stopTalk(); + if (_game.id == GID_DIG || _game.id == GID_CMI) { + if (VAR(VAR_HAVE_MSG)) + stopTalk(); + } else { + if (!_keepText) + stopTalk(); } if (_actorToPrintStrFor == 0xFF) { setTalkingActor(0xFF); @@ -1968,6 +1972,12 @@ void Actor::runActorTalkScript(int f) { if (_vm->_game.version == 8 && _vm->VAR(_vm->VAR_HAVE_MSG) == 2) return; + if (_vm->_game.id == GID_FT && _vm->_string[0].no_talk_anim) + return; + + if (!_vm->getTalkingActor() || _room != _vm->_currentRoom || _frame == f) + return; + if (_talkScript) { int script = _talkScript; int args[16]; @@ -1977,8 +1987,7 @@ void Actor::runActorTalkScript(int f) { _vm->runScript(script, 1, 0, args); } else { - if (_frame != f) - startAnimActor(f); + startAnimActor(f); } } @@ -2002,10 +2011,14 @@ void ScummEngine::stopTalk() { setTalkingActor(0xFF); a->_heTalking = false; } - if (_game.version == 8 || _game.heversion >= 60) + + if (_game.id == GID_DIG || _game.id == GID_CMI) { setTalkingActor(0); - if (_game.version == 8) VAR(VAR_HAVE_MSG) = 0; + } else if (_game.heversion >= 60) { + setTalkingActor(0); + } + _keepText = false; if (_game.version >= 7) { #ifndef DISABLE_SCUMM_7_8 -- cgit v1.2.3