[Scummvm-cvs-logs] scummvm master -> ab17bfb3d64a175dd5b6586b09789d784baa0b19
eriktorbjorn
eriktorbjorn at telia.com
Mon Jan 6 14:39:37 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ab17bfb3d6 NEVERHOOD: Use constants for messages in a couple of places
Commit: ab17bfb3d64a175dd5b6586b09789d784baa0b19
https://github.com/scummvm/scummvm/commit/ab17bfb3d64a175dd5b6586b09789d784baa0b19
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-01-06T05:37:56-08:00
Commit Message:
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.
Changed paths:
engines/neverhood/gamemodule.cpp
engines/neverhood/messages.h
engines/neverhood/modules/module2800.cpp
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 31eee4d..45f9465 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 7f16578..9816c2c 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 a8c5fb6..5d892de 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 {
More information about the Scummvm-git-logs
mailing list