[Scummvm-cvs-logs] SF.net SVN: scummvm:[49933] scummvm/trunk/engines/sci/engine/kernel32.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Jun 17 17:02:19 CEST 2010
Revision: 49933
http://scummvm.svn.sourceforge.net/scummvm/?rev=49933&view=rev
Author: mthreepwood
Date: 2010-06-17 15:02:18 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
Don't translate both x and y of the rect in kOnMe if only one of the variables is negative. Fixes the GKEgo hotspot outside of the Madame Cazanoux's house.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel32.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-06-17 14:06:12 UTC (rev 49932)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-06-17 15:02:18 UTC (rev 49933)
@@ -792,12 +792,16 @@
nsRect.bottom = readSelectorValue(s->_segMan, targetObject, SELECTOR(nsBottom));
uint16 itemX = readSelectorValue(s->_segMan, targetObject, SELECTOR(x));
uint16 itemY = readSelectorValue(s->_segMan, targetObject, SELECTOR(y));
- if (nsRect.left < 0 || nsRect.top < 0) {
- // If top and left are negative, we need to adjust coordinates by the item's x and y
- // (e.g. happens in GK1, day 1, with detective Mosely's hotspot in his office)
- nsRect.translate(itemX, itemY);
- }
+ // If top and left are negative, we need to adjust coordinates by the item's x and y
+ // (e.g. happens in GK1, day 1, with detective Mosely's hotspot in his office)
+
+ if (nsRect.left < 0)
+ nsRect.translate(itemX, 0);
+
+ if (nsRect.top < 0)
+ nsRect.translate(0, itemY);
+
// HACK: nsLeft and nsTop can be invalid, so try and fix them here using x and y
// (e.g. with the inventory screen in GK1)
if (nsRect.left == itemY && nsRect.top == itemX) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list