[Scummvm-cvs-logs] SF.net SVN: scummvm:[39088] scummvm/trunk/engines/cruise/cruise_main.cpp

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Mar 3 12:08:06 CET 2009


Revision: 39088
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39088&view=rev
Author:   dreammaster
Date:     2009-03-03 11:08:03 +0000 (Tue, 03 Mar 2009)

Log Message:
-----------
Corrected click handling when a text message is displaying to properly dismiss the text, rather than trying to immediately perform another action

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/cruise_main.cpp

Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp	2009-03-03 10:10:35 UTC (rev 39087)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp	2009-03-03 11:08:03 UTC (rev 39088)
@@ -1262,6 +1262,22 @@
 	linkedRelation = NULL;
 }
 
+bool checkInput(int16 *buttonPtr) {
+	int16 handle, button;
+	Common::Point pt;
+
+	getMouseStatus(&handle, &pt.x, &button, &pt.y);
+
+	if (!button)
+		buttonDown = 0;
+	else if (!buttonDown && button) {
+		*buttonPtr = button;
+		buttonDown = 1;
+	}
+
+	return false;
+}
+
 int processInput(void) {
 	int16 mouseX = 0;
 	int16 mouseY = 0;
@@ -1796,14 +1812,9 @@
 				}
 
 				if (userWait) {
-					int16 mouseButton;
-					int16 mouseX;
-					int16 mouseY;
+					int16 mouseButton = 0;
+					checkInput(&mouseButton);
 
-					do {
-						getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
-					} while (mouseButton);
-
 					while (!mouseButton) {
 						manageScripts(&relHead);
 						manageScripts(&procHead);
@@ -1813,13 +1824,12 @@
 
 						processAnimation();
 
+						flip();
+
 						// not exactly this
 						manageEvents();
 
-						int16 mouseVar;
-						getMouseStatus(&mouseVar, &mouseX, &mouseButton, &mouseY);
-
-						flip();
+						checkInput(&mouseButton);
 					}
 
 					changeScriptParamInList(-1, -1, &procHead, 9999, 0);


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