aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agi/agi.cpp6
-rw-r--r--engines/agi/agi.h8
2 files changed, 11 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 570bc29732..59beb087f2 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -83,14 +83,14 @@ void AgiEngine::processEvents() {
break;
case Common::EVENT_LBUTTONDOWN:
key = BUTTON_LEFT;
- g_mouse.button = 1;
+ g_mouse.button = kAgiMouseButtonLeft;
keyEnqueue(key);
g_mouse.x = event.mouse.x;
g_mouse.y = event.mouse.y;
break;
case Common::EVENT_RBUTTONDOWN:
key = BUTTON_RIGHT;
- g_mouse.button = 2;
+ g_mouse.button = kAgiMouseButtonRight;
keyEnqueue(key);
g_mouse.x = event.mouse.x;
g_mouse.y = event.mouse.y;
@@ -109,7 +109,7 @@ void AgiEngine::processEvents() {
break;
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
- g_mouse.button = 0;
+ g_mouse.button = kAgiMouseButtonUp;
g_mouse.x = event.mouse.x;
g_mouse.y = event.mouse.y;
break;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 42d6b016f0..b6358bd405 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -220,6 +220,14 @@ struct Mouse {
unsigned int y;
};
+// Used by AGI Mouse protocol 1.0 for v27 (i.e. button pressed -variable).
+enum AgiMouseButton {
+ kAgiMouseButtonUp, // Mouse button is up (not pressed)
+ kAgiMouseButtonLeft, // Left mouse button
+ kAgiMouseButtonRight, // Right mouse button
+ kAgiMouseButtonMiddle // Middle mouse button
+};
+
#define report printf
enum GameId {