aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorMax Horn2009-07-30 21:45:09 +0000
committerMax Horn2009-07-30 21:45:09 +0000
commit3f673b899df123feb4a659e44a49116fc2d8c1da (patch)
tree2f48b665e985faccd5c581a5efbf4eeeab35aa1f /engines/cruise
parenta411a5750e98697dc64da4c528ffe57dff7c9bbb (diff)
downloadscummvm-rg350-3f673b899df123feb4a659e44a49116fc2d8c1da.tar.gz
scummvm-rg350-3f673b899df123feb4a659e44a49116fc2d8c1da.tar.bz2
scummvm-rg350-3f673b899df123feb4a659e44a49116fc2d8c1da.zip
Patch #2828669: CRUISE: Fix cruise compilation with mingw32ce toolchain
svn-id: r42950
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise_main.cpp22
-rw-r--r--engines/cruise/cruise_main.h8
2 files changed, 15 insertions, 15 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index e2d6b5a323..19495ff931 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1390,7 +1390,7 @@ int CruiseEngine::processInput(void) {
}
// 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 @@ int CruiseEngine::processInput(void) {
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 @@ int CruiseEngine::processInput(void) {
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 @@ int CruiseEngine::processInput(void) {
}
}
- } else if ((button & MB_LEFT) && (buttonDown == 0)) {
+ } else if ((button & CRS_MB_LEFT) && (buttonDown == 0)) {
// left click
buttonDown = 1;
@@ -1587,7 +1587,7 @@ int CruiseEngine::processInput(void) {
}
}
}
- } 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 @@ bool manageEvents() {
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 @@ bool manageEvents() {
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 @@ bool manageEvents() {
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;
diff --git a/engines/cruise/cruise_main.h b/engines/cruise/cruise_main.h
index d2e9350d70..5f4d5c5c13 100644
--- a/engines/cruise/cruise_main.h
+++ b/engines/cruise/cruise_main.h
@@ -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