From caaba2ae95674931c38f1419e58b2d01ddeb941d Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Thu, 8 Oct 2009 12:04:34 +0000 Subject: Add a hack that fixes bug #2858887 and #2859606 svn-id: r44785 --- engines/gob/hotspots.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/gob') 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; -- cgit v1.2.3