aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorPaul Gilbert2012-06-03 21:16:25 +1000
committerPaul Gilbert2012-06-03 21:16:25 +1000
commitb566583e3231b70512b7954a7b00cc0f02f9f24c (patch)
tree000d78399d3fc3c3465fd63c30aaec876bcd1ca9 /engines/tony
parent3927d9020613682a7e38e5c387835e27e170fb66 (diff)
downloadscummvm-rg350-b566583e3231b70512b7954a7b00cc0f02f9f24c.tar.gz
scummvm-rg350-b566583e3231b70512b7954a7b00cc0f02f9f24c.tar.bz2
scummvm-rg350-b566583e3231b70512b7954a7b00cc0f02f9f24c.zip
TONY: Workaround for hang on title screen if you click with a y = 0
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/loc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index f0dd30b1a9..512c28605e 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -1298,6 +1298,10 @@ RMPoint RMCharacter::InvScanLine(const RMPoint &punto) {
}
Lscan.x = Lstart.x + Ldx;
Lscan.y = Lstart.y + Ldy;
+
+ // WORKAROUND: Handles cases where the points never fall inside a bounding box
+ if (Lscan.x < -100 || Lscan.y < -100 || Lscan.x >= 1000 || Lscan.y >= 1000)
+ return punto;
}
}