diff options
| author | Nicola Mettifogo | 2010-05-22 03:49:22 +0000 | 
|---|---|---|
| committer | Nicola Mettifogo | 2010-05-22 03:49:22 +0000 | 
| commit | bc479f8aef9b26d0690dfb8f311e41374d886d0c (patch) | |
| tree | 6d5e4ac885c6e61165fbd3ff84824f7f350df529 | |
| parent | 47d6e9eab7f657ac36b01c143a0bd5edba1d2361 (diff) | |
| download | scummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.tar.gz scummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.tar.bz2 scummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.zip | |
Make sure hitZone always gets absolute game coordinates. Based on the patch 3004658 by fuzzie.
svn-id: r49135
| -rw-r--r-- | engines/parallaction/input.cpp | 2 | ||||
| -rw-r--r-- | engines/parallaction/parallaction.cpp | 8 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index 60cc867226..d61d1bfb2b 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -352,7 +352,7 @@ bool Input::translateGameInput() {  void Input::enterInventoryMode() {  	Common::Point mousePos; -	getCursorPos(mousePos); +	getAbsoluteCursorPos(mousePos);  	bool hitCharacter = _vm->hitZone(kZoneYou, mousePos.x, mousePos.y);  	if (hitCharacter) { diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index cb208a17ff..9b5bd0d8aa 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -651,7 +651,6 @@ bool Parallaction::pickupItem(ZonePtr z) {  	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 @@ bool Parallaction::checkSpecialZoneBox(ZonePtr z, uint32 type, uint x, uint y) {  	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 @@ bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {  	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 @@ bool Parallaction::checkLinkedAnimBox(ZonePtr z, uint32 type, uint x, uint y) {  	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; | 
