aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-07-26 16:50:41 +0000
committerMax Horn2002-07-26 16:50:41 +0000
commit07a7c11954107ac1120eceb42463e0868a4240f1 (patch)
tree84c6fe15ad494e549faf9c9ff7e7fa30891be8cb
parentb167b06ebae80319cdab0da13780a6c5238949e6 (diff)
downloadscummvm-rg350-07a7c11954107ac1120eceb42463e0868a4240f1.tar.gz
scummvm-rg350-07a7c11954107ac1120eceb42463e0868a4240f1.tar.bz2
scummvm-rg350-07a7c11954107ac1120eceb42463e0868a4240f1.zip
fixed Monkey CD problem caused by my recent checkin
svn-id: r4639
-rw-r--r--actor.cpp19
-rw-r--r--actor.h2
2 files changed, 9 insertions, 12 deletions
diff --git a/actor.cpp b/actor.cpp
index be20f2dbd6..8019f2393b 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -274,7 +274,6 @@ int Actor::updateActorDirection()
void Actor::setBox(int box)
{
walkbox = box;
- mask = _vm->getMaskFromBox(box);
setupActorScale();
}
@@ -869,15 +868,14 @@ void Actor::drawActorCostume()
cr._outheight = _vm->virtscr->height;
- if (isInClass(20))
- mask = 0;
- forceClip = isInClass(21) ? 1 : 0;
+ cr._zbuf = _vm->getMaskFromBox(walkbox);
- cr._zbuf = mask;
- if (cr._zbuf > _vm->gdi._numZBuffer)
- cr._zbuf = (byte)_vm->gdi._numZBuffer;
if (forceClip)
- cr._zbuf = forceClip;
+ cr._zbuf = 1;
+ else if (isInClass(20))
+ cr._zbuf = 0;
+ else if (cr._zbuf > _vm->gdi._numZBuffer)
+ cr._zbuf = (byte)_vm->gdi._numZBuffer;
cr._shadow_table = _vm->_shadowPalette;
@@ -903,7 +901,7 @@ void Actor::drawActorCostume()
ar.scale_y = scaley;
ar.clipping = forceClip;
if (ar.clipping == 100) {
- ar.clipping = mask;
+ ar.clipping = _vm->getMaskFromBox(walkbox);
if (ar.clipping > (byte)_vm->gdi._numZBuffer)
ar.clipping = _vm->gdi._numZBuffer;
}
@@ -1259,7 +1257,6 @@ void Actor::walkActorOld()
return;
walkbox = walkdata.destbox;
- mask = _vm->getMaskFromBox(walkbox);
goto restart;
}
@@ -1294,7 +1291,6 @@ void Actor::walkActorOld()
}
walkbox = walkdata.curbox;
- mask = _vm->getMaskFromBox(walkbox);
moving &= MF_IN_LEG;
moving |= MF_NEW_LEG;
goto restart;
@@ -1398,6 +1394,7 @@ void Actor::classChanged(int cls, bool value)
case 20: // Never clip
break;
case 21: // Always clip
+ forceClip = value;
break;
case 22: // Ignore boxes
ignoreBoxes = value;
diff --git a/actor.h b/actor.h
index 3d9c6d3302..7ea108a1d5 100644
--- a/actor.h
+++ b/actor.h
@@ -91,7 +91,7 @@ public:
uint speedx, speedy;
byte frame;
byte walkbox;
- byte mask;
+ byte mask; // This field is *NOT* used anymore, only kept around to make saveload.cpp happy
byte animProgress, animSpeed;
int16 new_1, new_2;
uint16 talk_script, walk_script;