aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Boutonné2009-10-08 12:04:34 +0000
committerArnaud Boutonné2009-10-08 12:04:34 +0000
commitcaaba2ae95674931c38f1419e58b2d01ddeb941d (patch)
tree776c884317623db4385ba5f3fcf2baf15f900364
parent43a60d965a4a543eaaf1dd63336024c85373e1be (diff)
downloadscummvm-rg350-caaba2ae95674931c38f1419e58b2d01ddeb941d.tar.gz
scummvm-rg350-caaba2ae95674931c38f1419e58b2d01ddeb941d.tar.bz2
scummvm-rg350-caaba2ae95674931c38f1419e58b2d01ddeb941d.zip
Add a hack that fixes bug #2858887 and #2859606
svn-id: r44785
-rw-r--r--engines/gob/hotspots.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index d2ad46c04c..e0df00fedc 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -155,13 +155,15 @@ bool Hotspots::Hotspot::isDisabled() const {
}
bool Hotspots::Hotspot::isIn(uint16 x, uint16 y) const {
- if (x < left)
+ // FIXME: the cast to int16 is a hack, to fix handling of Gob2 problems related to
+ // hotspots with negative offset (to temporary disable them).
+ if ((int16) x < (int16) left)
return false;
- if (x > right)
+ if ((int16) x > (int16) right)
return false;
- if (y < top)
+ if ((int16) y < (int16) top)
return false;
- if (y > bottom)
+ if ((int16) y > (int16) bottom)
return false;
return true;