[Scummvm-cvs-logs] SF.net SVN: scummvm: [25366] scummvm/trunk/engines/scumm/boxes.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Feb 4 00:10:17 CET 2007
Revision: 25366
http://scummvm.svn.sourceforge.net/scummvm/?rev=25366&view=rev
Author: fingolfin
Date: 2007-02-03 15:10:17 -0800 (Sat, 03 Feb 2007)
Log Message:
-----------
Changed old FIXME comment into a WORKAROUND comment (it worked fine all these years, after all :); also added some paranoia checks
Modified Paths:
--------------
scummvm/trunk/engines/scumm/boxes.cpp
Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp 2007-02-03 22:42:45 UTC (rev 25365)
+++ scummvm/trunk/engines/scumm/boxes.cpp 2007-02-03 23:10:17 UTC (rev 25366)
@@ -585,13 +585,10 @@
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 @@
* 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 @@
if (getBoxFlags(box1nr) & kBoxInvisible || getBoxFlags(box2nr) & kBoxInvisible)
return false;
+ assert(_game.version >= 3);
box2 = getBoxCoordinates(box1nr);
box = getBoxCoordinates(box2nr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list