[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.256,1.257 scumm.cpp,1.87,1.88 sound.cpp,1.351,1.352 string.cpp,1.224,1.225
Travis Howell
kirben at users.sourceforge.net
Thu Jul 15 20:42:22 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25404/scumm
Modified Files:
actor.cpp scumm.cpp sound.cpp string.cpp
Log Message:
Fix bugs:
FT: Stadium Salesman Glitches
COMI: Wally's Fake piratehook still on ground after pick up
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -d -r1.256 -r1.257
--- actor.cpp 15 Jul 2004 12:26:10 -0000 1.256
+++ actor.cpp 16 Jul 2004 03:39:23 -0000 1.257
@@ -1172,8 +1172,9 @@
}
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 @@
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 @@
_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 @@
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 @@
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();
}
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- scumm.cpp 15 Jul 2004 23:15:13 -0000 1.87
+++ scumm.cpp 16 Jul 2004 03:39:23 -0000 1.88
@@ -1468,7 +1468,8 @@
} 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;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.351
retrieving revision 1.352
diff -u -d -r1.351 -r1.352
--- sound.cpp 15 Jul 2004 12:26:10 -0000 1.351
+++ sound.cpp 16 Jul 2004 03:39:23 -0000 1.352
@@ -515,7 +515,7 @@
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 @@
}
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();
}
}
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -d -r1.224 -r1.225
--- string.cpp 15 Jul 2004 23:15:13 -0000 1.224
+++ string.cpp 16 Jul 2004 03:39:23 -0000 1.225
@@ -143,7 +143,7 @@
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 @@
_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);
More information about the Scummvm-git-logs
mailing list