[Scummvm-cvs-logs] SF.net SVN: scummvm:[47868] scummvm/trunk/engines/gob

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Wed Feb 3 23:14:06 CET 2010


Revision: 47868
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47868&view=rev
Author:   strangerke
Date:     2010-02-03 22:14:06 +0000 (Wed, 03 Feb 2010)

Log Message:
-----------
Fascination - based on the theoritical values of flag, use getWindow instead of the code I added. Suppress shr 8 in getWindow and switched from int8 to uint16, in order to match the executable.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/hotspots.cpp
    scummvm/trunk/engines/gob/hotspots.h

Modified: scummvm/trunk/engines/gob/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/gob/hotspots.cpp	2010-02-03 22:06:57 UTC (rev 47867)
+++ scummvm/trunk/engines/gob/hotspots.cpp	2010-02-03 22:14:06 UTC (rev 47868)
@@ -85,8 +85,8 @@
 	return kMouseButtonsNone;
 }
 
-uint8 Hotspots::Hotspot::getWindow() const {
-	return (flags & 0x0F00) >> 8;
+uint16 Hotspots::Hotspot::getWindow() const {
+	return (flags & 0x0F00);
 }
 
 uint8 Hotspots::Hotspot::getCursor() const {
@@ -576,16 +576,16 @@
 				continue;
 
 //Strangerke, for Fascination
-			if ((spot.flags & 0xFF00) != winId)
-				continue;
+//			if ((spot.flags & 0xFF00) != winId)
+//				continue;
 
 			if (spot.getType() > kTypeMove)
 				// Only consider click and move hotspots
 				continue;
 
-//			if (spot.getWindow() != 0)
-				// Only check the main window
-//				continue;
+			if (spot.getWindow() != winId)
+				// Only check the current window
+				continue;
 
 			if (!spot.isIn(_vm->_global->_inter_mouseX - dx, _vm->_global->_inter_mouseY - dy))
 				// If we're not in it, ignore it
@@ -610,13 +610,13 @@
 				continue;
 
 //Strangerke, for Fascination
-			if ((spot.flags & 0xFF00) != winId)
+//			if ((spot.flags & 0xFF00) != winId)
+//				continue;
+
+			if (spot.getWindow() != winId)
+				// Only check the active window
 				continue;
 
-//			if (spot.getWindow() != 0)
-				// Only check the main window
-//				continue;
-
 			if (spot.getType() < kTypeMove)
 				// Only consider hotspots that can be clicked
 				continue;
@@ -1665,6 +1665,8 @@
 			cursor = 0;
 			for (int i = 0; (i < kHotspotCount) && !_hotspots[i].isEnd(); i++) {
 				const Hotspot &spot = _hotspots[i];
+				// this check is /really/ Fascination specific. 
+				// It's illogical, so if it's to be reused in Adi games... Be careful!
 				if ((spot.flags & 0xFF00) == curType)
 					if (spot.isIn(x - deltax, y - deltay)) {
 						if (spot.getType() < kTypeInput1NoLeave)

Modified: scummvm/trunk/engines/gob/hotspots.h
===================================================================
--- scummvm/trunk/engines/gob/hotspots.h	2010-02-03 22:06:57 UTC (rev 47867)
+++ scummvm/trunk/engines/gob/hotspots.h	2010-02-03 22:14:06 UTC (rev 47868)
@@ -128,7 +128,7 @@
 
 		Type         getType  () const;
 		MouseButtons getButton() const;
-		uint8        getWindow() const;
+		uint16       getWindow() const;
 		uint8        getCursor() const;
 		uint8        getState () const;
 


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