aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-10-18 15:55:10 +0000
committerMax Horn2006-10-18 15:55:10 +0000
commit169bc3880df8951f6ce8bbcb335ce6da8ad892e3 (patch)
tree3b04bd6ac976598545477ba66e9abcc64308c0e0 /engines
parent865e7b7c027d180c917cb0ba8b25a42a3faf3319 (diff)
downloadscummvm-rg350-169bc3880df8951f6ce8bbcb335ce6da8ad892e3.tar.gz
scummvm-rg350-169bc3880df8951f6ce8bbcb335ce6da8ad892e3.tar.bz2
scummvm-rg350-169bc3880df8951f6ce8bbcb335ce6da8ad892e3.zip
cleanup
svn-id: r24373
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/boxes.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 534426b635..736915ff08 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -542,16 +542,21 @@ bool ScummEngine::checkXYInBoxBounds(int b, int x, int y) {
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;