aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-06-04 06:18:28 +0000
committerTravis Howell2005-06-04 06:18:28 +0000
commit0148bbaac5aea11b67793cf3f5d7bfb6369d6f83 (patch)
tree3772ebf4c7828964310062652d4a76c87ab0d7c7 /scumm/actor.cpp
parentc635d5f2f9a56b3ba877eb36b65e5041ef1fa78e (diff)
downloadscummvm-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.cpp35
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