aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorGregory Montoir2005-10-31 19:48:48 +0000
committerGregory Montoir2005-10-31 19:48:48 +0000
commit9cb06c2a5d0a6887fd0bffeae0715bcf92565c53 (patch)
tree45946a5986ca8ecf92d6e8dd581aac282c71e081 /scumm
parent0063257a2bf4284b50945f337b81db951cfad364 (diff)
downloadscummvm-rg350-9cb06c2a5d0a6887fd0bffeae0715bcf92565c53.tar.gz
scummvm-rg350-9cb06c2a5d0a6887fd0bffeae0715bcf92565c53.tar.bz2
scummvm-rg350-9cb06c2a5d0a6887fd0bffeae0715bcf92565c53.zip
- VAR_CHARCOUNT isn't set in v7/v8, removed reference to it from v7::actorTalk()
- simplified some versions related checks svn-id: r19378
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index a093833a83..dc85f41b9c 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1338,15 +1338,13 @@ void ScummEngine_v7::actorTalk(const byte *msg) {
// Play associated speech, if any
playSpeech((byte *)_lastStringTag);
+ if ((_version == 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
+ stopTalk();
+ }
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);
@@ -1363,10 +1361,8 @@ void ScummEngine_v7::actorTalk(const byte *msg) {
_charsetBufPos = 0;
_talkDelay = 0;
_haveMsg = 0xFF;
- if (_version <= 7)
+ if (_version == 7)
VAR(VAR_HAVE_MSG) = 0xFF;
- if (VAR_CHARCOUNT != 0xFF)
- VAR(VAR_CHARCOUNT) = 0;
CHARSET_1();
}
#endif
@@ -1383,7 +1379,7 @@ void ScummEngine::actorTalk(const byte *msg) {
}
if (_actorToPrintStrFor == 0xFF) {
- if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
+ if (!_keepText) {
stopTalk();
}
setTalkingActor(0xFF);
@@ -1397,11 +1393,12 @@ void ScummEngine::actorTalk(const byte *msg) {
}
a = derefActor(_actorToPrintStrFor, "actorTalk");
- if (!a->isInCurrentRoom() && (_version <= 6)) {
+ if (!a->isInCurrentRoom()) {
oldact = 0xFF;
} else {
- if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG)))
+ if (!_keepText) {
stopTalk();
+ }
setTalkingActor(a->_number);
a->_heTalking = true;
if (!_string[0].no_talk_anim) {
@@ -1428,8 +1425,7 @@ void ScummEngine::actorTalk(const byte *msg) {
_charsetBufPos = 0;
_talkDelay = 0;
_haveMsg = 0xFF;
- if (_version <= 7)
- VAR(VAR_HAVE_MSG) = 0xFF;
+ VAR(VAR_HAVE_MSG) = 0xFF;
if (VAR_CHARCOUNT != 0xFF)
VAR(VAR_CHARCOUNT) = 0;
CHARSET_1();