[Scummvm-cvs-logs] SF.net SVN: scummvm:[49135] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat May 22 05:49:22 CEST 2010


Revision: 49135
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49135&view=rev
Author:   peres001
Date:     2010-05-22 03:49:22 +0000 (Sat, 22 May 2010)

Log Message:
-----------
Make sure hitZone always gets absolute game coordinates. Based on the patch 3004658 by fuzzie.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/input.cpp
    scummvm/trunk/engines/parallaction/parallaction.cpp

Modified: scummvm/trunk/engines/parallaction/input.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/input.cpp	2010-05-21 18:33:24 UTC (rev 49134)
+++ scummvm/trunk/engines/parallaction/input.cpp	2010-05-22 03:49:22 UTC (rev 49135)
@@ -352,7 +352,7 @@
 
 void Input::enterInventoryMode() {
 	Common::Point mousePos;
-	getCursorPos(mousePos);
+	getAbsoluteCursorPos(mousePos);
 	bool hitCharacter = _vm->hitZone(kZoneYou, mousePos.x, mousePos.y);
 
 	if (hitCharacter) {

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2010-05-21 18:33:24 UTC (rev 49134)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2010-05-22 03:49:22 UTC (rev 49135)
@@ -651,7 +651,6 @@
 	return (slot != -1);
 }
 
-// FIXME: input coordinates must be offseted to handle scrolling!
 bool Parallaction::checkSpecialZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
 	// not a special zone
 	if ((z->getX() != -2) && (z->getX() != -3)) {
@@ -681,7 +680,6 @@
 	return false;
 }
 
-// FIXME: input coordinates must be offseted to handle scrolling!
 bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
 	if (z->_flags & kFlagsRemove)
 		return false;
@@ -711,7 +709,6 @@
 	return false;
 }
 
-// FIXME: input coordinates must be offseted to handle scrolling!
 bool Parallaction::checkLinkedAnimBox(ZonePtr z, uint32 type, uint x, uint y) {
 	if (z->_flags & kFlagsRemove)
 		return false;
@@ -739,6 +736,11 @@
 	return false;
 }
 
+/* NOTE: hitZone needs to be passed absolute game coordinates to work.
+
+   When type is kZoneMerge, then x and y are the identifiers of the objects to merge,
+   and the above requirement does not apply.
+*/
 ZonePtr Parallaction::hitZone(uint32 type, uint16 x, uint16 y) {
 	uint16 _di = y;
 	uint16 _si = x;


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