Index: scummvm/scumm/actor.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v retrieving revision 1.314 diff -U5 -w -d -r1.314 actor.cpp --- scummvm/scumm/actor.cpp 12 Oct 2004 14:40:27 -0000 1.314 +++ scummvm/scumm/actor.cpp 4 Nov 2004 19:04:30 -0000 @@ -1034,11 +1034,11 @@ } bcr->_clipOverride = _clipOverride; if (_vm->_version == 4 && boxscale & 0x8000) { - bcr->_scaleX = bcr->_scaleY = _vm->getScale(_walkbox, _pos.x, _pos.y); + bcr->_scaleX = bcr->_scaleY = _vm->getScaleFromSlot((boxscale & 0x7fff) + 1, _pos.x, _pos.y); } else { bcr->_scaleX = scalex; bcr->_scaleY = scaley; } Index: scummvm/scumm/boxes.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.cpp,v retrieving revision 1.81 diff -U5 -w -d -r1.81 boxes.cpp --- scummvm/scumm/boxes.cpp 28 Sep 2004 23:35:07 -0000 1.81 +++ scummvm/scumm/boxes.cpp 4 Nov 2004 19:04:32 -0000 @@ -175,12 +175,20 @@ slot = 0; } // Was a scale slot specified? If so, we compute the effective scale // from it, ignoring the box scale. - if (slot) { + if (slot) + scale = getScaleFromSlot(slot, x, y); + + return scale; +} + + +int ScummEngine::getScaleFromSlot(int slot, int x, int y) { assert(1 <= slot && slot <= ARRAYSIZE(_scaleSlots)); + int scale; int scaleX = 0, scaleY = 0; ScaleSlot &s = _scaleSlots[slot-1]; if (s.y1 == s.y2 && s.x1 == s.x2) error("Invalid scale slot %d", slot); @@ -206,13 +214,11 @@ // Clip the scale to range 1-255 if (scale < 1) scale = 1; else if (scale > 255) scale = 255; - } - // Finally return the scale return scale; } int ScummEngine::getBoxScale(int box) { if (_features & GF_NO_SCALING) Index: scummvm/scumm/scumm.h =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v retrieving revision 1.513 diff -U5 -w -d -r1.513 scumm.h --- scummvm/scumm/scumm.h 24 Oct 2004 06:58:41 -0000 1.513 +++ scummvm/scumm/scumm.h 4 Nov 2004 19:04:33 -0000 @@ -1115,10 +1115,11 @@ Box *getBoxBaseAddr(int box); byte getBoxFlags(int box); int getBoxScale(int box); int getScale(int box, int x, int y); + int getScaleFromSlot(int slot, int x, int y); protected: // Scaling slots/items struct ScaleSlot { int x1, y1, scale1;