aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-07-16 03:39:23 +0000
committerTravis Howell2004-07-16 03:39:23 +0000
commitbd8c7f08f626eb75b5eb3d20769b3de2a3aeda43 (patch)
tree837761099ad8ddb8bbfa0aeef97acde02c544e11 /scumm
parentefbd2fe42feacbcc93a72932aadb35af8d8bd512 (diff)
downloadscummvm-rg350-bd8c7f08f626eb75b5eb3d20769b3de2a3aeda43.tar.gz
scummvm-rg350-bd8c7f08f626eb75b5eb3d20769b3de2a3aeda43.tar.bz2
scummvm-rg350-bd8c7f08f626eb75b5eb3d20769b3de2a3aeda43.zip
Fix bugs:
FT: Stadium Salesman Glitches COMI: Wally's Fake piratehook still on ground after pick up svn-id: r14221
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp33
-rw-r--r--scumm/scumm.cpp3
-rw-r--r--scumm/sound.cpp5
-rw-r--r--scumm/string.cpp6
4 files changed, 32 insertions, 15 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 90bfff0c86..d616844ce6 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1172,8 +1172,9 @@ void ScummEngine::actorTalk(const byte *msg) {
}
if (_actorToPrintStrFor == 0xFF) {
- if (!_keepText)
+ if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
stopTalk();
+ }
setTalkingActor(0xFF);
} else {
int oldact;
@@ -1188,10 +1189,10 @@ void ScummEngine::actorTalk(const byte *msg) {
if (!a->isInCurrentRoom() && (_version <= 6)) {
oldact = 0xFF;
} else {
- if (!_keepText)
+ if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG)))
stopTalk();
setTalkingActor(a->number);
- if (!_string[0].no_talk_anim) {
+ if ((_version == 8) || (_version <= 7 && !_string[0].no_talk_anim)) {
a->runActorTalkScript(a->talkStartFrame);
_useTalkAnims = true;
}
@@ -1210,13 +1211,17 @@ void ScummEngine::actorTalk(const byte *msg) {
_charsetBufPos = 0;
_talkDelay = 0;
_haveMsg = 0xFF;
- VAR(VAR_HAVE_MSG) = 0xFF;
+ if (_version <= 7)
+ VAR(VAR_HAVE_MSG) = 0xFF;
if (VAR_CHARCOUNT != 0xFF)
VAR(VAR_CHARCOUNT) = 0;
CHARSET_1();
}
void Actor::runActorTalkScript(int f) {
+ if (_vm->_version == 8 && _vm->VAR(_vm->VAR_HAVE_MSG) == 2)
+ return;
+
if (talkScript) {
int script = talkScript;
int args[16];
@@ -1225,8 +1230,10 @@ void Actor::runActorTalkScript(int f) {
args[0] = number;
_vm->runScript(script, 1, 0, args);
- } else
- startAnimActor(f);
+ } else {
+ if (frame != f)
+ startAnimActor(f);
+ }
}
void ScummEngine::stopTalk() {
@@ -1240,15 +1247,19 @@ void ScummEngine::stopTalk() {
act = getTalkingActor();
if (act && act < 0x80) {
Actor *a = derefActor(act, "stopTalk");
- if ((a->isInCurrentRoom() && _useTalkAnims) || (_features & GF_NEW_COSTUMES)) {
- a->runActorTalkScript(a->talkStopFrame);
- _useTalkAnims = false;
+ if (a->isInCurrentRoom()) {
+ if (_version == 8 || (_version == 7 && !_string[0].no_talk_anim) || (_version <= 6 && _useTalkAnims)) {
+ a->runActorTalkScript(a->talkStopFrame);
+ _useTalkAnims = false;
+ }
}
- if (!(_features & GF_HUMONGOUS))
+ if (_version <= 7 && !(_features & GF_HUMONGOUS))
setTalkingActor(0xFF);
}
- if (_features & GF_HUMONGOUS)
+ if (_version == 8 || _features & GF_HUMONGOUS)
setTalkingActor(0);
+ if (_version == 8)
+ VAR(VAR_HAVE_MSG) = 0;
_keepText = false;
_charset->restoreCharsetBg();
}
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 45259a24c8..f49e14581a 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1468,7 +1468,8 @@ int ScummEngine::scummLoop(int delta) {
} else {
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
}
- VAR(VAR_HAVE_MSG) = (_haveMsg == 0xFE) ? 0xFF : _haveMsg;
+ if (_version <= 7)
+ VAR(VAR_HAVE_MSG) = (_haveMsg == 0xFE) ? 0xFF : _haveMsg;
if (_version <= 2) {
VAR(VAR_VIRT_MOUSE_X) = _virtualMouse.x / 8;
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 7b788fe81e..ade35e7d6f 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -515,7 +515,7 @@ void Sound::processSfxQueues() {
finished = !_talkChannelHandle.isActive();
}
- if ((uint) act < 0x80 && !_vm->_string[0].no_talk_anim && (finished || !_endOfMouthSync)) {
+ if ((uint) act < 0x80 && ((_vm->_version == 8) || (_vm->_version <= 7 && !_vm->_string[0].no_talk_anim)) && (finished || !_endOfMouthSync)) {
a = _vm->derefActor(act, "processSfxQueues");
if (a->isInCurrentRoom()) {
b = finished || isMouthSyncOff(_curSoundPos);
@@ -531,7 +531,8 @@ void Sound::processSfxQueues() {
}
if ((!ConfMan.getBool("subtitles") && finished && _vm->_version <= 6) || (finished && _vm->_talkDelay == 0)) {
- _vm->stopTalk();
+ if (!(_vm->_version == 8 && _vm->VAR(_vm->VAR_HAVE_MSG) == 0))
+ _vm->stopTalk();
}
}
diff --git a/scumm/string.cpp b/scumm/string.cpp
index a580c481a8..13bcc43010 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -143,7 +143,7 @@ void ScummEngine::CHARSET_1() {
if (_talkDelay)
return;
- if (_haveMsg == 1) {
+ if ((_version <= 7 && _haveMsg == 1) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
if ((_sound->_sfxMode & 2) == 0)
stopTalk();
return;
@@ -307,6 +307,10 @@ void ScummEngine::CHARSET_1() {
_charsetBufPos = buffer - _charsetBuffer;
+ // TODO Verify this is correct spot
+ if (_version == 8)
+ VAR(VAR_HAVE_MSG) = (_string[0].no_talk_anim) ? 2 : 1;
+
// FIXME: Remove this and the next two lines eventually!
if (_charset->_hasMask != (_charset->_str.left != -1))
warning("_hasMask mismatch (case A %d) - please report to Fingolfin if you notice any text/graphics glitches related to this!", _charset->_hasMask);