diff options
author | Max Horn | 2002-07-26 15:55:21 +0000 |
---|---|---|
committer | Max Horn | 2002-07-26 15:55:21 +0000 |
commit | 034b2cfb10d4bd12a50dea2be11585f965362a60 (patch) | |
tree | a5a69c539d7a3a81ec1b164043bf4983aa8c2054 | |
parent | 89a65b7c015b919f97456e1883390986184e09b5 (diff) | |
download | scummvm-rg350-034b2cfb10d4bd12a50dea2be11585f965362a60.tar.gz scummvm-rg350-034b2cfb10d4bd12a50dea2be11585f965362a60.tar.bz2 scummvm-rg350-034b2cfb10d4bd12a50dea2be11585f965362a60.zip |
small fix to the actor drawing code, fixes some glitches in MI1VGA
svn-id: r4637
-rw-r--r-- | actor.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -199,12 +199,12 @@ int Actor::remapDirection(int dir) flipY = (walkdata.YXFactor > 0); // Check for X-Flip - if ((flags & 0x08) || isInClass(0x1E)) { // 0x1E = 30 + if ((flags & 0x08) || isInClass(30)) { dir = 360 - dir; flipX = !flipX; } // Check for Y-Flip - if ((flags & 0x10) || isInClass(0x1D)) { // 0x1E = 29 + if ((flags & 0x10) || isInClass(29)) { dir = 180 - dir; flipY = !flipY; } @@ -598,7 +598,7 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom) || !(_vm->_features & GF_SMALL_HEADER)) for (j = box; j >= firstValidBox; j--) { flags = _vm->getBoxFlags(j); - if (flags & 0x80 && (!(flags & 0x20) || isInClass(0x1F))) + if (flags & 0x80 && (!(flags & 0x20) || isInClass(31))) continue; if (pathfrom >= firstValidBox) { @@ -612,7 +612,7 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom) // closed doors in some cases in Zak256. However a better fix // would be to recompute the box matrix whenever flags change. flags = _vm->getBoxFlags(i); - if (flags & 0x80 && (!(flags & 0x20) || isInClass(0x1F))) + if (flags & 0x80 && (!(flags & 0x20) || isInClass(31))) continue; } } @@ -862,11 +862,6 @@ void Actor::drawActorCostume() if (!(_vm->_features & GF_AFTER_V7)) { CostumeRenderer cr(_vm); - if (isInClass(20)) - mask = 0; - else if (isInClass(21)) - forceClip = 1; - cr._actorX = x - _vm->virtscr->xstart; cr._actorY = y - elevation; cr._scaleX = scalex; @@ -874,6 +869,10 @@ void Actor::drawActorCostume() cr._outheight = _vm->virtscr->height; + if (isInClass(20)) + mask = 0; + forceClip = isInClass(21) ? 1 : 0; + cr._zbuf = mask; if (cr._zbuf > _vm->gdi._numZBuffer) cr._zbuf = (byte)_vm->gdi._numZBuffer; |