Ticket #8213: loom-walk.diff

File loom-walk.diff, 2.7 KB (added by eriktorbjorn, 21 years ago)

Patch against a May 2 CVS snapshot

  • scummvm/scumm/actor.cpp

    diff -ur ScummVM-cvs20030502/scummvm/scumm/actor.cpp ScummVM-cvs20030502+hack/scummvm/scumm/actor.cpp
    old new  
    175175        bool flipX;
    176176        bool flipY;
    177177
    178         // FIXME - why was this here? It breaks some animations in LoomCD, and logical,
    179         // why should we not honor box flags when ignoreBoxes is on? If this change
    180         // breaks anything, or if you know why the if() was in originally, please
    181         // tell this to Fingolfin.
    182        
    183         // Addendum: it seems that at least in "The Dig" the original code
    184         // does check ignoreBoxes here...
    185         // I am not sure what was broken in LoomCD. I am re-enabling this for now
    186         // If new breakage occurs in LoomCD, we can perform this check
    187         // conditionally depending on the Scumm version being used...
    188        
    189         // Also at least in The Dig, it checks if the actor is in the current room, but
    190         // that's not necessary here because we can never be called if the actor is
    191         // not in the current room anyway.
     178        // FIXME - It seems that at least in The Dig the original code does
     179        // check ignoreBoxes here. However, it breaks some animations in Loom,
     180        // causing Bobbin to face towards the camera instead of away from it
     181        // in some places: After the tree has been destroyed by lightning, and
     182        // when entering the dark tunnels beyond the dragon's lair at the very
     183        // least. Possibly other places as well.
     184        //
     185        // The Dig also checks if the actor is in the current room, but that's
     186        // not necessary here because we never call the function unless the
     187        // actor is in the current room anyway.
    192188       
    193         if (!ignoreBoxes) {
     189        if (!ignoreBoxes || _vm->_gameId == GID_LOOM || _vm->_gameId == GID_LOOM256) {
    194190                specdir = _vm->_extraBoxFlags[walkbox];
    195191                if (specdir) {
    196192                        if (specdir & 0x8000) {
     
    212208                flipX = (walkdata.XYFactor > 0);
    213209                flipY = (walkdata.YXFactor > 0);
    214210
    215                 // FIXME - this special cases for the class might be necesary for other
    216                 // games besides Loom CD!
     211                // FIXME - this special cases for the class might be necesary
     212                // for other games besides Loom!
    217213
    218214                // Check for X-Flip
    219                 if ((flags & kBoxXFlip) || isInClass(_vm->_gameId == GID_LOOM256 ? 19 : 30)) {
     215                if ((flags & kBoxXFlip) || isInClass((_vm->_gameId == GID_LOOM256 || _vm->_gameId == GID_LOOM) ? 19 : 30)) {
    220216                        dir = 360 - dir;
    221217                        flipX = !flipX;
    222218                }
    223219                // Check for Y-Flip
    224                 if ((flags & kBoxYFlip) || isInClass(_vm->_gameId == GID_LOOM256 ? 18 : 29)) {
     220                if ((flags & kBoxYFlip) || isInClass((_vm->_gameId == GID_LOOM256 || _vm->_gameId == GID_LOOM) ? 18 : 29)) {
    225221                        dir = 180 - dir;
    226222                        flipY = !flipY;
    227223                }