Ticket #8095: rusty.diff

File rusty.diff, 1.3 KB (added by eriktorbjorn, 18 years ago)

Patch against an October 16 CVS snapshot

  • scummvm/scumm/actor.cpp

    diff -ur ScummVM-cvs20021016/scummvm/scumm/actor.cpp ScummVM-cvs20021016+hack/scummvm/scumm/actor.cpp
    old new  
    895895
    896896                cr._outheight = _vm->virtscr->height;
    897897
    898                 cr._zbuf = _vm->getMaskFromBox(walkbox);
     898                // If walkbox is 0, that could mean two things:
     899                //
     900                // Either the actor is or has been moved around with
     901                // ignoreBoxes != 0. In this case, use the mask for the
     902                // walkbox the actor is currently inside or, if it's not in
     903                // any walkbox, don't mask at all.
     904                //
     905                // This fixes two graphics glitches in Loom. Bobbin's feet
     906                // are not obscured after Rusty's ghost has shown him what's
     907                // happened to The Forge, and Rusty himself isn't partially
     908                // obscured after Bobbin heals him.
     909                //
     910                // Or it could mean that the actor really is in walkbox 0.
     911
     912                if (walkbox == 0) {
     913                        int i;
     914
     915                        cr._zbuf = 0;
     916
     917                        for (i = _vm->getNumBoxes() - 1; i >= 0; i--) {
     918                                if (_vm->checkXYInBoxBounds(i, x, y)) {
     919                                        cr._zbuf = _vm->getMaskFromBox(i);
     920                                        break;
     921                                }
     922                        }
     923                } else
     924                        cr._zbuf = _vm->getMaskFromBox(walkbox);
    899925
    900926                if (forceClip)
    901927                        cr._zbuf = forceClip;