diff options
author | Max Horn | 2006-10-29 13:30:20 +0000 |
---|---|---|
committer | Max Horn | 2006-10-29 13:30:20 +0000 |
commit | 41b4a34b5b7f9f91f25204503ea9b951cbfc5c26 (patch) | |
tree | 0e35f4596e6a492fef8af02dc9680ee378e7ef84 /engines/scumm/actor.cpp | |
parent | 25069065f39c2289992ebe7be20417d6451f3a21 (diff) | |
download | scummvm-rg350-41b4a34b5b7f9f91f25204503ea9b951cbfc5c26.tar.gz scummvm-rg350-41b4a34b5b7f9f91f25204503ea9b951cbfc5c26.tar.bz2 scummvm-rg350-41b4a34b5b7f9f91f25204503ea9b951cbfc5c26.zip |
cleanup
svn-id: r24565
Diffstat (limited to 'engines/scumm/actor.cpp')
-rw-r--r-- | engines/scumm/actor.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 569c39dd19..681065b956 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -926,6 +926,28 @@ int Actor::getActorXYPos(int &xPos, int &yPos) const { return 0; } +static bool inBoxQuickReject(const BoxCoords &box, int x, int y, int threshold) { + int t; + + t = x - threshold; + if (t > box.ul.x && t > box.ur.x && t > box.lr.x && t > box.ll.x) + return true; + + t = x + threshold; + if (t < box.ul.x && t < box.ur.x && t < box.lr.x && t < box.ll.x) + return true; + + t = y - threshold; + if (t > box.ul.y && t > box.ur.y && t > box.lr.y && t > box.ll.y) + return true; + + t = y + threshold; + if (t < box.ul.y && t < box.ur.y && t < box.lr.y && t < box.ll.y) + return true; + + return false; +} + AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY) { const uint thresholdTable[] = { 30, 80, 0 }; AdjustBoxResult abr; |