From 69ba8e57c2c16be3ec19af88cd46e427fc9f64ea Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 3 Feb 2007 23:10:17 +0000 Subject: Changed old FIXME comment into a WORKAROUND comment (it worked fine all these years, after all :); also added some paranoia checks svn-id: r25366 --- engines/scumm/boxes.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'engines/scumm/boxes.cpp') diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index d00e7a8bc0..df5c58fe69 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -585,13 +585,10 @@ BoxCoords ScummEngine::getBoxCoordinates(int boxnum) { box->lr.x = (short)FROM_LE_32(bp->v8.lrx); box->lr.y = (short)FROM_LE_32(bp->v8.lry); - // FIXME: Some walkboxes in CMI appear to have been flipped, - // in the sense that for instance the lower boundary is above - // the upper one. Can that really be the case, or is there - // some more sinister problem afoot? - // - // Is this fix sufficient, or will we need something more - // elaborate? + // WORKAROUND (see patch #684732): Some walkboxes in CMI appear + // to have been flipped, in the sense that for instance the + // lower boundary is above the upper one. We work around this + // by simply flipping them back. if (box->ul.y > box->ll.y && box->ur.y > box->lr.y) { SWAP(box->ul, box->ll); @@ -779,6 +776,7 @@ int ScummEngine::getPathToDestBox(byte from, byte to) { * line in order to get from box1 to box3 via box2. */ bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, Common::Point &foundPath) { + assert(_game.version >= 3); BoxCoords box1 = _vm->getBoxCoordinates(box1nr); BoxCoords box2 = _vm->getBoxCoordinates(box2nr); Common::Point tmp; @@ -1047,6 +1045,7 @@ bool ScummEngine::areBoxesNeighbours(int box1nr, int box2nr) { if (getBoxFlags(box1nr) & kBoxInvisible || getBoxFlags(box2nr) & kBoxInvisible) return false; + assert(_game.version >= 3); box2 = getBoxCoordinates(box1nr); box = getBoxCoordinates(box2nr); -- cgit v1.2.3