[Scummvm-cvs-logs] SF.net SVN: scummvm: [24373] scummvm/trunk/engines/scumm/boxes.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Oct 18 17:55:14 CEST 2006
Revision: 24373
http://svn.sourceforge.net/scummvm/?rev=24373&view=rev
Author: fingolfin
Date: 2006-10-18 08:55:10 -0700 (Wed, 18 Oct 2006)
Log Message:
-----------
cleanup
Modified Paths:
--------------
scummvm/trunk/engines/scumm/boxes.cpp
Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp 2006-10-18 15:09:11 UTC (rev 24372)
+++ scummvm/trunk/engines/scumm/boxes.cpp 2006-10-18 15:55:10 UTC (rev 24373)
@@ -542,16 +542,21 @@
return true;
}
+ // Finally, fall back to the classic algorithm to compute containment
+ // in a convex polygon: For each (oriented) side of the polygon
+ // (quadrangle in this case), compute whether p is "left" or "right"
+ // from it.
+
if (!compareSlope(box.ul, box.ur, p))
return false;
if (!compareSlope(box.ur, box.lr, p))
return false;
-
- if (!compareSlope(box.ll, p, box.lr))
+
+ if (!compareSlope(box.lr, box.ll, p))
return false;
- if (!compareSlope(box.ul, p, box.ll))
+ if (!compareSlope(box.ll, box.ul, p))
return false;
return true;
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