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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jul 30 23:45:09 CEST 2009


Revision: 42950
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42950&view=rev
Author:   fingolfin
Date:     2009-07-30 21:45:09 +0000 (Thu, 30 Jul 2009)

Log Message:
-----------
Patch #2828669: CRUISE: Fix cruise compilation with mingw32ce toolchain

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

Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp	2009-07-30 21:12:27 UTC (rev 42949)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp	2009-07-30 21:45:09 UTC (rev 42950)
@@ -1390,7 +1390,7 @@
 	}
 
 	// Player Menu - test for both buttons or the F10 key
-	if (((button & MB_BOTH) == MB_BOTH) || (keyboardCode == Common::KEYCODE_F10)) {
+	if (((button & CRS_MB_BOTH) == CRS_MB_BOTH) || (keyboardCode == Common::KEYCODE_F10)) {
 		changeCursor(CURSOR_NORMAL);
 		keyboardCode = Common::KEYCODE_INVALID;
 		return (playerMenu(mouseX, mouseY));
@@ -1398,7 +1398,7 @@
 
 	if (userWait) {
 		// Check for left mouse button click or Space to end user waiting
-		if ((keyboardCode == Common::KEYCODE_SPACE) || (button == MB_LEFT))
+		if ((keyboardCode == Common::KEYCODE_SPACE) || (button == CRS_MB_LEFT))
 			userWait = 0;
 
 		keyboardCode = Common::KEYCODE_INVALID;
@@ -1450,7 +1450,7 @@
 				menuDown = 0;
 			}
 		} else {
-			if ((button & MB_LEFT) && (buttonDown == 0)) {
+			if ((button & CRS_MB_LEFT) && (buttonDown == 0)) {
 				if (menuTable[0]) {
 					callRelation(getSelectedEntryInMenu(menuTable[0]), dialogueObj);
 
@@ -1472,7 +1472,7 @@
 			}
 		}
 
-	} else if ((button & MB_LEFT) && (buttonDown == 0)) {
+	} else if ((button & CRS_MB_LEFT) && (buttonDown == 0)) {
 		// left click
 		buttonDown = 1;
 
@@ -1587,7 +1587,7 @@
 				}
 			}
 		}
-	} else if ((button & MB_RIGHT) || (keyboardCode == Common::KEYCODE_F9)) {
+	} else if ((button & CRS_MB_RIGHT) || (keyboardCode == Common::KEYCODE_F9)) {
 		if (buttonDown == 0) {
 			keyboardCode = Common::KEYCODE_INVALID;
 
@@ -1633,16 +1633,16 @@
 
 		switch (event.type) {
 		case Common::EVENT_LBUTTONDOWN:
-			currentMouseButton |= MB_LEFT;
+			currentMouseButton |= CRS_MB_LEFT;
 			break;
 		case Common::EVENT_LBUTTONUP:
-			currentMouseButton &= ~MB_LEFT;
+			currentMouseButton &= ~CRS_MB_LEFT;
 			break;
 		case Common::EVENT_RBUTTONDOWN:
-			currentMouseButton |= MB_RIGHT;
+			currentMouseButton |= CRS_MB_RIGHT;
 			break;
 		case Common::EVENT_RBUTTONUP:
-			currentMouseButton &= ~MB_RIGHT;
+			currentMouseButton &= ~CRS_MB_RIGHT;
 			break;
 		case Common::EVENT_MOUSEMOVE:
 			currentMouseX = event.mouse.x;
@@ -1656,7 +1656,7 @@
 		case Common::EVENT_KEYUP:
 			switch (event.kbd.keycode) {
 			case Common::KEYCODE_ESCAPE:
-				currentMouseButton &= ~MB_MIDDLE;
+				currentMouseButton &= ~CRS_MB_MIDDLE;
 				break;
 			default:
 				break;
@@ -1665,7 +1665,7 @@
 		case Common::EVENT_KEYDOWN:
 			switch (event.kbd.keycode) {
 			case Common::KEYCODE_ESCAPE:
-				currentMouseButton |= MB_MIDDLE;
+				currentMouseButton |= CRS_MB_MIDDLE;
 				break;
 			default:
 				keyboardCode = event.kbd.keycode;

Modified: scummvm/trunk/engines/cruise/cruise_main.h
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.h	2009-07-30 21:12:27 UTC (rev 42949)
+++ scummvm/trunk/engines/cruise/cruise_main.h	2009-07-30 21:45:09 UTC (rev 42950)
@@ -56,10 +56,10 @@
 namespace Cruise {
 
 enum MouseButton {
-	MB_LEFT = 1,
-	MB_RIGHT = 2,
-	MB_MIDDLE = 4,
-	MB_BOTH = MB_LEFT | MB_RIGHT
+	CRS_MB_LEFT = 1,
+	CRS_MB_RIGHT = 2,
+	CRS_MB_MIDDLE = 4,
+	CRS_MB_BOTH = CRS_MB_LEFT | CRS_MB_RIGHT
 };
 
 /*#define DUMP_SCRIPT


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