aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-01-15 02:59:51 +0000
committerTravis Howell2004-01-15 02:59:51 +0000
commit6752f57473d9bbfdcd2acd66f2c70ce2c6e76e0b (patch)
tree2733e82eff0c41bb976430fde6b1a7cac44858cc /scumm/actor.cpp
parentb99db7695845efa59cdb02f01159d7c1b87a612c (diff)
downloadscummvm-rg350-6752f57473d9bbfdcd2acd66f2c70ce2c6e76e0b.tar.gz
scummvm-rg350-6752f57473d9bbfdcd2acd66f2c70ce2c6e76e0b.tar.bz2
scummvm-rg350-6752f57473d9bbfdcd2acd66f2c70ce2c6e76e0b.zip
Use simpler checks
HE games used old directions style svn-id: r12397
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r--scumm/actor.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 2cc09837cf..a9fcd3da58 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -308,12 +308,12 @@ int Actor::updateActorDirection(bool is_walking) {
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::setupActorScale() {
}
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 @@ void Actor::startAnimActor(int f) {
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 @@ void Actor::startAnimActor(int f) {
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 @@ void Actor::startAnimActor(int f) {
// 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::startAnimActor(int f) {
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 @@ void Actor::drawActorCostume() {
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) {