[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.7,1.229.2.8 actor.h,1.51.2.1,1.51.2.2 script_v6.cpp,1.293.2.14,1.293.2.15 script_v8.cpp,2.229.2.4,2.229.2.5 scummvm.cpp,2.577.2.20,2.577.2.21 sound.cpp,1.320.2.6,1.320.2.7 string.cpp,1.193.2.4,1.193.2.5 verbs.cpp,1.93,1.93.2.1
Travis Howell
kirben at users.sourceforge.net
Sat Jul 17 01:29:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/scumm
Modified Files:
Tag: branch-0-6-0
actor.cpp actor.h script_v6.cpp script_v8.cpp scummvm.cpp
sound.cpp string.cpp verbs.cpp
Log Message:
Back port bug fixes:
#899323 - FT: Computers' Text Drawn Incorrectly
#778281 - FT: Talking choice menu causes overlapped actors to flicker
#897105 - FT: Stadium Salesman Glitches
#754419 - 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.229.2.7
retrieving revision 1.229.2.8
diff -u -d -r1.229.2.7 -r1.229.2.8
--- actor.cpp 10 Jul 2004 04:11:36 -0000 1.229.2.7
+++ actor.cpp 17 Jul 2004 08:27:55 -0000 1.229.2.8
@@ -1170,7 +1170,7 @@
}
if (_actorToPrintStrFor == 0xFF) {
- if (!_keepText)
+ if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG)))
stopTalk();
setTalkingActor(0xFF);
} else {
@@ -1186,11 +1186,11 @@
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) {
- a->startAnimActor(a->talkStartFrame);
+ if ((_version == 8) || (_version <= 7 && !_string[0].no_talk_anim)) {
+ a->runActorTalkScript(a->talkStartFrame);
_useTalkAnims = true;
}
oldact = getTalkingActor();
@@ -1208,12 +1208,31 @@
_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];
+ memset(args, 0, sizeof(args));
+ args[1] = f;
+ args[0] = number;
+
+ _vm->runScript(script, 1, 0, args);
+ } else {
+ if (frame != f)
+ startAnimActor(f);
+ }
+}
+
void ScummEngine::stopTalk() {
int act;
@@ -1225,15 +1244,19 @@
act = getTalkingActor();
if (act && act < 0x80) {
Actor *a = derefActor(act, "stopTalk");
- if ((a->isInCurrentRoom() && _useTalkAnims) || (_features & GF_NEW_COSTUMES)) {
- a->startAnimActor(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: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.51.2.1
retrieving revision 1.51.2.2
diff -u -d -r1.51.2.1 -r1.51.2.2
--- actor.h 29 Jun 2004 11:11:30 -0000 1.51.2.1
+++ actor.h 17 Jul 2004 08:27:55 -0000 1.51.2.2
@@ -165,6 +165,7 @@
protected:
void startWalkAnim(int cmd, int angle);
public:
+ void runActorTalkScript(int f);
void startAnimActor(int frame);
void remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold);
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.14
retrieving revision 1.293.2.15
diff -u -d -r1.293.2.14 -r1.293.2.15
--- script_v6.cpp 7 Jul 2004 10:09:28 -0000 1.293.2.14
+++ script_v6.cpp 17 Jul 2004 08:27:55 -0000 1.293.2.15
@@ -1900,12 +1900,6 @@
VerbSlot *vs;
byte op;
- // Full Throttle implements conversation by creating new verbs, one
- // for each option, but it never tells when to actually draw them.
-
- if (_gameId == GID_FT)
- _verbRedraw = true;
-
op = fetchScriptByte();
if (op == 196) {
_curVerb = pop();
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.229.2.4
retrieving revision 2.229.2.5
diff -u -d -r2.229.2.4 -r2.229.2.5
--- script_v8.cpp 7 Jul 2004 10:09:29 -0000 2.229.2.4
+++ script_v8.cpp 17 Jul 2004 08:27:55 -0000 2.229.2.5
@@ -1036,7 +1036,6 @@
break;
// case 0x7A: // SO_ACTOR_INIT Set current actor (handled above)
case 0x7B: // SO_ACTOR_VARIABLE Set actor variable
- // FIXME - is this right??
i = pop();
a->setAnimVar(pop(), i);
break;
@@ -1306,15 +1305,9 @@
// warning("o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
break;
case 23: // setActorChoreLimbFrame
- // FIXME: This still isn't quite working correctly. See bug #754419
- // This opcode is used a lot in script 28.
-
-// warning("o8_kernelSetFunctions: setActorChoreLimbFrame(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
a = derefActor(args[1], "o8_kernelSetFunctions:setActorChoreLimbFrame");
-
a->startAnimActor(args[2]);
a->animateLimb(args[3], args[4]);
-
break;
case 24: // clearTextQueue
// TODO - clearTextQueue. Maybe this should just call removeBlastTexts() ?
@@ -1502,15 +1495,6 @@
void ScummEngine_v8::o8_getActorChore() {
int actnum = pop();
Actor *a = derefActor(actnum, "o8_getActorChore");
-
- // FIXME: This is a hack for the cannon scene, as something isn't quite right
- // here yet..
- if ((_roomResource == 10) && (vm.slot[_currentScript].number == 2021)) {
- //warning("o8_getActorChore() hack: would have returned %d", a->frame);
- push(11);
- return;
- }
-
push(a->frame);
}
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v
retrieving revision 2.577.2.20
retrieving revision 2.577.2.21
diff -u -d -r2.577.2.20 -r2.577.2.21
--- scummvm.cpp 10 Jul 2004 04:11:38 -0000 2.577.2.20
+++ scummvm.cpp 17 Jul 2004 08:27:55 -0000 2.577.2.21
@@ -1338,7 +1338,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;
@@ -1501,9 +1502,9 @@
processDrawQue();
- if (_verbRedraw) {
+ // Full Throttle always redraws verbs and draws verbs before actors
+ if ((_gameId == GID_FT) || _verbRedraw)
redrawVerbs();
- }
setActorRedrawFlags();
resetActorBgs();
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.320.2.6
retrieving revision 1.320.2.7
diff -u -d -r1.320.2.6 -r1.320.2.7
--- sound.cpp 15 Jul 2004 05:43:55 -0000 1.320.2.6
+++ sound.cpp 17 Jul 2004 08:27:56 -0000 1.320.2.7
@@ -445,23 +445,24 @@
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);
if (_mouthSyncMode != b) {
_mouthSyncMode = b;
if (_talk_sound_frame != -1) {
- a->startAnimActor(_talk_sound_frame);
+ a->runActorTalkScript(_talk_sound_frame);
_talk_sound_frame = -1;
} else
- a->startAnimActor(b ? a->talkStopFrame : a->talkStartFrame);
+ a->runActorTalkScript(b ? a->talkStopFrame : a->talkStartFrame);
}
}
}
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.193.2.4
retrieving revision 1.193.2.5
diff -u -d -r1.193.2.4 -r1.193.2.5
--- string.cpp 3 May 2004 10:57:49 -0000 1.193.2.4
+++ string.cpp 17 Jul 2004 08:27:56 -0000 1.193.2.5
@@ -166,7 +166,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;
@@ -333,10 +333,14 @@
if (has_talk_sound)
_sound->talkSound(talk_sound_a, talk_sound_b, 2, frme);
if (a && has_anim)
- a->startAnimActor(frme != -1 ? frme : a->talkStartFrame);
+ a->runActorTalkScript(frme != -1 ? frme : a->talkStartFrame);
_charsetBufPos = buffer - _charsetBuffer;
+ // TODO Verify this is correct spot
+ if (_version == 8)
+ VAR(VAR_HAVE_MSG) = (_string[0].no_talk_anim) ? 2 : 1;
+
_charset->_hasMask = (_charset->_str.left != -1);
_charset->_mask = _charset->_str;
}
@@ -388,14 +392,6 @@
if (_version < 7)
_charset->_ignoreCharsetMask = true;
-
- // In Full Throttle (and other games?), verb text should always mask
- // and never time out. We can't do it blindly for all games, because
- // it causes problem with the FOA intro.
-
- if ((_gameId == GID_FT) && a == 4)
- _talkDelay = -1;
-
if (!buf[0]) {
buf[0] = ' ';
buf[1] = 0;
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.93
retrieving revision 1.93.2.1
diff -u -d -r1.93 -r1.93.2.1
--- verbs.cpp 16 Jan 2004 10:20:43 -0000 1.93
+++ verbs.cpp 17 Jul 2004 08:27:56 -0000 1.93.2.1
@@ -266,8 +266,10 @@
if (_version <= 2 && !(_userState & 128)) // Don't draw verbs unless active
return;
- int i;
- int verb = (_cursor.state > 0 ? checkMouseOver(_mouse.x, _mouse.y) : 0);
+ int i, verb = 0;
+ if ((_gameId == GID_FT) || _cursor.state > 0)
+ verb = checkMouseOver(_mouse.x, _mouse.y);
+
for (i = _numVerbs-1; i >= 0; i--) {
if (i == verb && _verbs[verb].hicolor)
drawVerb(i, 1);
@@ -325,6 +327,9 @@
if (_version <= 2 && !(_userState & 128))
return;
+ if (_gameId == GID_FT)
+ return;
+
if (_verbMouseOver == verb)
return;
@@ -422,6 +427,9 @@
}
void ScummEngine::restoreVerbBG(int verb) {
+ if (_gameId == GID_FT)
+ return;
+
VerbSlot *vs;
vs = &_verbs[verb];
More information about the Scummvm-git-logs
mailing list