diff options
author | Travis Howell | 2004-01-11 08:39:39 +0000 |
---|---|---|
committer | Travis Howell | 2004-01-11 08:39:39 +0000 |
commit | b3e44d8f00b763b09ab8979b98a5024cf802343d (patch) | |
tree | 9661082df3a272bfda68754032b4136b76901886 /scumm/actor.cpp | |
parent | 9cd7d7959638336b4424ccb50231dd466199ba61 (diff) | |
download | scummvm-rg350-b3e44d8f00b763b09ab8979b98a5024cf802343d.tar.gz scummvm-rg350-b3e44d8f00b763b09ab8979b98a5024cf802343d.tar.bz2 scummvm-rg350-b3e44d8f00b763b09ab8979b98a5024cf802343d.zip |
This make HE games actor clipping code closer to disasm.
Add some missing code for akos games.
svn-id: r12315
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index b1abeb0326..254cba1542 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -963,29 +963,29 @@ void Actor::drawActorCostume() { bcr->setPalette(palette); bcr->setFacing(this); - if (!(_vm->_features & GF_NEW_COSTUMES)) { + if (_vm->_features & GF_NEW_COSTUMES) { - if (forceClip) - bcr->_zbuf = forceClip; - else if (isInClass(kObjectClassNeverClip)) - bcr->_zbuf = 0; - else { + bcr->_zbuf = forceClip; + if ((bcr->_zbuf == 100) || ((_vm->_features & GF_HUMONGOUS) && (bcr->_zbuf == 0))) { bcr->_zbuf = _vm->getMaskFromBox(walkbox); if (bcr->_zbuf > _vm->gdi._numZBuffer-1) bcr->_zbuf = _vm->gdi._numZBuffer-1; } - bcr->_draw_top = top = 0xFF; - } else { + bcr->_draw_top = top = 0x7fffffff; - bcr->_zbuf = forceClip; - if ((bcr->_zbuf == 100) || ((_vm->_features & GF_HUMONGOUS) && (bcr->_zbuf == 0))) { + } else { + if (forceClip) + bcr->_zbuf = forceClip; + else if (isInClass(kObjectClassNeverClip)) + bcr->_zbuf = 0; + else { bcr->_zbuf = _vm->getMaskFromBox(walkbox); if (bcr->_zbuf > _vm->gdi._numZBuffer-1) bcr->_zbuf = _vm->gdi._numZBuffer-1; } - bcr->_draw_top = top = 0x7fffffff; + bcr->_draw_top = top = 0xFF; } bcr->_draw_bottom = bottom = 0; @@ -993,7 +993,7 @@ void Actor::drawActorCostume() { // If the actor is partially hidden, redraw it next frame. // Only done for pre-AKOS, though. if (bcr->drawCostume(_vm->virtscr[0], cost) & 1) { - needRedraw = !(_vm->_features & GF_NEW_COSTUMES); + needRedraw = !(_vm->_version >= 7); } // Record the vertical extent of the drawn actor @@ -1217,6 +1217,9 @@ void Actor::setActorCostume(int c) { _vm->ensureResourceLoaded(rtCostume, costume); } startAnimActor(initFrame); + } else { + costume = c; + cost.reset(); } } else { if (visible) { |