diff options
author | Max Horn | 2006-10-18 15:55:10 +0000 |
---|---|---|
committer | Max Horn | 2006-10-18 15:55:10 +0000 |
commit | 169bc3880df8951f6ce8bbcb335ce6da8ad892e3 (patch) | |
tree | 3b04bd6ac976598545477ba66e9abcc64308c0e0 /engines | |
parent | 865e7b7c027d180c917cb0ba8b25a42a3faf3319 (diff) | |
download | scummvm-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.cpp | 11 |
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; |