Speech needs to be started, before subtitles are drawn. Otherwise subtitle can't be disabled.

svn-id: r18329
This commit is contained in:
Travis Howell 2005-06-04 06:18:28 +00:00
parent c635d5f2f9
commit 0148bbaac5

View File

@ -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