diff options
author | Travis Howell | 2005-06-04 06:18:28 +0000 |
---|---|---|
committer | Travis Howell | 2005-06-04 06:18:28 +0000 |
commit | 0148bbaac5aea11b67793cf3f5d7bfb6369d6f83 (patch) | |
tree | 3772ebf4c7828964310062652d4a76c87ab0d7c7 /scumm/actor.cpp | |
parent | c635d5f2f9a56b3ba877eb36b65e5041ef1fa78e (diff) | |
download | scummvm-rg350-0148bbaac5aea11b67793cf3f5d7bfb6369d6f83.tar.gz scummvm-rg350-0148bbaac5aea11b67793cf3f5d7bfb6369d6f83.tar.bz2 scummvm-rg350-0148bbaac5aea11b67793cf3f5d7bfb6369d6f83.zip |
Speech needs to be started, before subtitles are drawn. Otherwise subtitle can't be disabled.
svn-id: r18329
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index e1137fa000..e57b1aa995 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1286,10 +1286,43 @@ int ScummEngine::getActorFromPos(int x, int y) { #ifndef DISABLE_SCUMM_7_8 void ScummEngine_v7::actorTalk(const byte *msg) { - ScummEngine::actorTalk(msg); + Actor *a; + convertMessageToString(msg, _charsetBuffer, sizeof(_charsetBuffer)); + // Play associated speech, if any playSpeech((byte *)_lastStringTag); + + if (_actorToPrintStrFor == 0xFF) { + if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) { + stopTalk(); + } + setTalkingActor(0xFF); + } else { + a = derefActor(_actorToPrintStrFor, "actorTalk"); + if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) + stopTalk(); + setTalkingActor(a->_number); + if (!_string[0].no_talk_anim) { + a->runActorTalkScript(a->_talkStartFrame); + _useTalkAnims = true; + } + } + + if (getTalkingActor() > 0x7F) { + _charsetColor = (byte)_string[0].color; + } else { + a = derefActor(getTalkingActor(), "actorTalk(2)"); + _charsetColor = a->_talkColor; + } + _charsetBufPos = 0; + _talkDelay = 0; + _haveMsg = 0xFF; + if (_version <= 7) + VAR(VAR_HAVE_MSG) = 0xFF; + if (VAR_CHARCOUNT != 0xFF) + VAR(VAR_CHARCOUNT) = 0; + CHARSET_1(); } #endif |