Ticket #8121: loom-masking.diff

File loom-masking.diff, 2.3 KB (added by eriktorbjorn, 21 years ago)

Patch against a November 8 CVS snapshot

  • scummvm/scumm/actor.cpp

    diff -ur ScummVM-cvs20021108/scummvm/scumm/actor.cpp ScummVM-cvs20021108+hack/scummvm/scumm/actor.cpp
    old new  
    899899                // FIXME - Hack to fix two glitches in the scene where Bobbin
    900900                // heals Rusty: Bobbin's feet get masked when Rusty shows him
    901901                // what happens to The Forge, and Rusty gets masked after
    902                 // Bobbin heals him.
     902                // Bobbin heals him. (Room 34)
     903                //
     904                // It also fixes a much less noticable glitch when Bobbin
     905                // jumps out of Mandible's cage. (Room 43)
    903906                //
    904907                // When an actor is moved around without regards to walkboxes,
    905908                // its walkbox is set to 0. Unfortunately that's a valid
     
    910913                // to be at the moment or, if it's not in any box, don't mask
    911914                // at all.
    912915                //
    913                 // Checking if ignoreBoxes != 0 isn't enough to fix all the
    914                 // glitches, so I have to check for walkbox 0. However, that
    915                 // gives too many false positives -- it breaks masking in a
    916                 // few other rooms, e.g. when Stoke leaves the room where he
     916                // This is similar to the clipping == 100 check used for AKOS
     917                // costumes, except I haven't been able to figure out the
     918                // proper check here. It's not quite enough to check if
     919                // ignoreBoxes != 0 and checking if walkbox == 0 yields too
     920                // many false positives, e.g. Bobbin leaving the sandy beach
     921                // towards the forest, or Stoke leaving the room where he
    917922                // locks up "Rusty".
    918923                //
    919924                // Until someone can find the proper fix, only apply it to the
    920                 // one room where it's actually needed.
     925                // rooms where it's actually known to be needed.
    921926
    922                 if (_vm->_gameId == GID_LOOM256 && _vm->_currentRoom == 34 && walkbox == 0) {
     927                if (_vm->_gameId == GID_LOOM256 && (_vm->_currentRoom == 34 || _vm->_currentRoom == 43) && walkbox == 0) {
    923928                        int num_boxes, i;
    924929
    925930                        cr._zbuf = 0;
    926931                        num_boxes = _vm->getNumBoxes();
    927932
    928                         // For this particular room it won't matter in which
    929                         // direction we loop. In other rooms, looping in the
    930                         // other direction may pick the wrong box.
     933                        // Sometimes boxes overlap, so the direction of this
     934                        // loop matters in some rooms.
    931935
    932936                        for (i = 0; i < num_boxes; i++) {
    933937                                if (_vm->checkXYInBoxBounds(i, x, y)) {