[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.215,1.216 akos.cpp,1.101,1.102
Travis Howell
kirben at users.sourceforge.net
Wed Jan 14 19:00:02 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9763/scumm
Modified Files:
actor.cpp akos.cpp
Log Message:
Use simpler checks
HE games used old directions style
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -d -r1.215 -r1.216
--- actor.cpp 14 Jan 2004 04:24:57 -0000 1.215
+++ actor.cpp 15 Jan 2004 02:59:51 -0000 1.216
@@ -308,12 +308,12 @@
if ((_vm->_version == 6) && ignoreTurns)
return facing;
- dirType = (_vm->_features & GF_NEW_COSTUMES) ? _vm->akos_hasManyDirections(costume) : false;
+ dirType = (_vm->_version >= 7) ? _vm->akos_hasManyDirections(costume) : false;
from = toSimpleDir(dirType, facing);
dir = remapDirection(targetFacing, is_walking);
- if (_vm->_features & GF_NEW_COSTUMES)
+ if (_vm->_version >= 7)
// Direction interpolation interfers with walk scripts in Dig; they perform
// (much better) interpolation themselves.
shouldInterpolate = false;
@@ -422,7 +422,7 @@
}
void Actor::startAnimActor(int f) {
- if ((_vm->_features & GF_NEW_COSTUMES) && !(_vm->_features & GF_HUMONGOUS)) {
+ if (_vm->_version >= 7) {
switch (f) {
case 1001:
f = initFrame;
@@ -440,6 +440,16 @@
f = talkStopFrame;
break;
}
+
+ frame = f;
+
+ if (costume != 0) {
+ animProgress = 0;
+ needRedraw = true;
+ if (f == initFrame)
+ cost.reset();
+ _vm->akos_decodeData(this, f, (uint) - 1);
+ }
} else {
switch (f) {
case 0x38:
@@ -458,19 +468,7 @@
f = talkStopFrame;
break;
}
- }
- if (_vm->_features & GF_NEW_COSTUMES) {
- frame = f;
-
- if (costume != 0) {
- animProgress = 0;
- needRedraw = true;
- if (f == initFrame)
- cost.reset();
- _vm->akos_decodeData(this, f, (uint) - 1);
- }
- } else {
assert(f != 0x3E);
frame = f;
@@ -482,7 +480,10 @@
// Causes Zak to lose his body in several scenes, see bug #771508
if (_vm->_version >= 3 && f == initFrame)
cost.reset();
- _vm->cost_decodeData(this, f, (uint) - 1);
+ if (_vm->_features & GF_NEW_COSTUMES)
+ _vm->akos_decodeData(this, f, (uint) - 1);
+ else
+ _vm->cost_decodeData(this, f, (uint) - 1);
}
}
}
@@ -490,7 +491,7 @@
void Actor::animateActor(int anim) {
int cmd, dir;
- if ((_vm->_features & GF_NEW_COSTUMES) && !(_vm->_features & GF_HUMONGOUS)) {
+ if (_vm->_version >= 7) {
if (anim == 0xFF)
anim = 2000;
@@ -965,7 +966,7 @@
bcr->setPalette(palette);
bcr->setFacing(this);
- if ((_vm->_features & GF_NEW_COSTUMES) && !(_vm->_features & GF_HUMONGOUS)) {
+ if (_vm->_version >= 7) {
bcr->_zbuf = forceClip;
if (bcr->_zbuf == 100) {
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- akos.cpp 12 Jan 2004 14:09:39 -0000 1.101
+++ akos.cpp 15 Jan 2004 02:59:51 -0000 1.102
@@ -126,7 +126,7 @@
}
int ScummEngine::akos_frameToAnim(Actor *a, int frame) {
- if (akos_hasManyDirections(a->costume))
+ if (_version >= 7 && akos_hasManyDirections(a->costume))
return toSimpleDir(1, a->getFacing()) + frame * 8;
else
return newDirToOldDir(a->getFacing()) + frame * 4;
More information about the Scummvm-git-logs
mailing list