diff options
author | James Brown | 2002-10-17 09:21:55 +0000 |
---|---|---|
committer | James Brown | 2002-10-17 09:21:55 +0000 |
commit | 25e46a4434ee5a77d2c54a005d268d933fe5c6bb (patch) | |
tree | 3eaccffca8df5f7b4fdad22a57120552c5e5145f /scumm | |
parent | 6addfa9909a378b4623d1eeb10a92d87abd60c7c (diff) | |
download | scummvm-rg350-25e46a4434ee5a77d2c54a005d268d933fe5c6bb.tar.gz scummvm-rg350-25e46a4434ee5a77d2c54a005d268d933fe5c6bb.tar.bz2 scummvm-rg350-25e46a4434ee5a77d2c54a005d268d933fe5c6bb.zip |
Patch 624477: Fix for bug 609716
svn-id: r5171
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index a648d15a7a..14c1ce7a8d 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -895,7 +895,33 @@ void Actor::drawActorCostume() cr._outheight = _vm->virtscr->height; - cr._zbuf = _vm->getMaskFromBox(walkbox); + // If walkbox is 0, that could mean two things: + // + // Either the actor is or has been moved around with + // ignoreBoxes != 0. In this case, use the mask for the + // walkbox the actor is currently inside or, if it's not in + // any walkbox, don't mask at all. + // + // This fixes two graphics glitches in Loom. Bobbin's feet + // are not obscured after Rusty's ghost has shown him what's + // happened to The Forge, and Rusty himself isn't partially + // obscured after Bobbin heals him. + // + // Or it could mean that the actor really is in walkbox 0. + + if (walkbox == 0) { + int i; + + cr._zbuf = 0; + + for (i = _vm->getNumBoxes() - 1; i >= 0; i--) { + if (_vm->checkXYInBoxBounds(i, x, y)) { + cr._zbuf = _vm->getMaskFromBox(i); + break; + } + } + } else + cr._zbuf = _vm->getMaskFromBox(walkbox); if (forceClip) cr._zbuf = forceClip; |