diff options
author | Torbjörn Andersson | 2014-01-06 14:37:56 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2014-01-06 14:37:56 +0100 |
commit | ab17bfb3d64a175dd5b6586b09789d784baa0b19 (patch) | |
tree | 867d3e8bf924d92911d3624dd66654aba564ee7f /engines/neverhood | |
parent | 0176d343bcc11cd1993587697edd065b03302c24 (diff) | |
download | scummvm-rg350-ab17bfb3d64a175dd5b6586b09789d784baa0b19.tar.gz scummvm-rg350-ab17bfb3d64a175dd5b6586b09789d784baa0b19.tar.bz2 scummvm-rg350-ab17bfb3d64a175dd5b6586b09789d784baa0b19.zip |
NEVERHOOD: Use constants for messages in a couple of places
Ideally, we should always use constants of course. But I guess we
don't yet have sensible names for all messages.
Diffstat (limited to 'engines/neverhood')
-rw-r--r-- | engines/neverhood/gamemodule.cpp | 4 | ||||
-rw-r--r-- | engines/neverhood/messages.h | 9 | ||||
-rw-r--r-- | engines/neverhood/modules/module2800.cpp | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 31eee4da55..45f9465a11 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -95,7 +95,7 @@ void GameModule::handleMouseMove(int16 x, int16 y) { mousePos.x = x; mousePos.y = y; debug(2, "GameModule::handleMouseMove(%d, %d)", x, y); - sendPointMessage(_childObject, 0, mousePos); + sendPointMessage(_childObject, NM_MOUSE_MOVE, mousePos); } } @@ -115,7 +115,7 @@ void GameModule::handleMouseUp(int16 x, int16 y) { mousePos.x = x; mousePos.y = y; debug(2, "GameModule::handleMouseUp(%d, %d)", x, y); - sendPointMessage(_childObject, 0x0002, mousePos); + sendPointMessage(_childObject, NM_MOUSE_RELEASE, mousePos); } } diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h index 7f165787bf..9816c2ca86 100644 --- a/engines/neverhood/messages.h +++ b/engines/neverhood/messages.h @@ -28,6 +28,7 @@ namespace Neverhood { enum NeverhoodMessage { NM_MOUSE_MOVE = 0x0000, NM_MOUSE_CLICK = 0x0001, + NM_MOUSE_RELEASE = 0x0002, NM_MOUSE_HIDE = 0x101D, NM_MOUSE_SHOW = 0x101E, NM_KEYPRESS_SPACE = 0x0009, @@ -56,12 +57,12 @@ enum NeverhoodMessage { NM_KLAYMEN_CLOSE_DOOR = 0x4809, NM_KLAYMEN_MOVE_OBJECT = 0x480A, NM_KLAYMEN_LOWER_LEVER = 0x480F, - NM_KLAYMEN_PICKUP = 0x4812, - NM_KLAYMEN_PRESS_BUTTON = 0x4816, - NM_KLAYMEN_INSERT_DISK = 0x481A, + NM_KLAYMEN_PICKUP = 0x4812, + NM_KLAYMEN_PRESS_BUTTON = 0x4816, + NM_KLAYMEN_INSERT_DISK = 0x481A, NM_KLAYMEN_TURN_TO_USE = 0x481D, NM_KLAYMEN_RETURN_FROM_USE = 0x481E, - NM_KLAYMEN_RELEASE_LEVER = 0x4827, + NM_KLAYMEN_RELEASE_LEVER = 0x4827, NM_MOVE_TO_BACK = 0x482A, NM_MOVE_TO_FRONT = 0x482B diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp index a8c5fb6438..5d892de224 100644 --- a/engines/neverhood/modules/module2800.cpp +++ b/engines/neverhood/modules/module2800.cpp @@ -574,7 +574,7 @@ uint32 Scene2802::handleMessage(int messageNum, const MessageParam ¶m, Entit } } break; - case 0x0002: + case NM_MOUSE_RELEASE: if (_countdown1 == 0) _currTuneStatus = 0; else { |