aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood/gamemodule.cpp
diff options
context:
space:
mode:
authorKamil Zbróg2014-01-07 00:13:05 +0000
committerKamil Zbróg2014-01-07 00:13:05 +0000
commite94fabc37407a7d300af04493b0f5cbced42a092 (patch)
tree998bfaa03109a49d2bb9ec5b17e817ef7cc32a4c /engines/neverhood/gamemodule.cpp
parent165b8be77f4621ff5de8a483c6cd9ac497492a0a (diff)
parent4f6c3efa15c68dfa49bf5e6fe75dec034abe903b (diff)
downloadscummvm-rg350-e94fabc37407a7d300af04493b0f5cbced42a092.tar.gz
scummvm-rg350-e94fabc37407a7d300af04493b0f5cbced42a092.tar.bz2
scummvm-rg350-e94fabc37407a7d300af04493b0f5cbced42a092.zip
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'engines/neverhood/gamemodule.cpp')
-rw-r--r--engines/neverhood/gamemodule.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 31eee4da55..5e9981caa6 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -79,7 +79,7 @@ GameModule::GameModule(NeverhoodEngine *vm)
_mainMenuRequested(false) {
// Other initializations moved to actual engine class
- _vm->_soundMan->playSoundThree(0x002D0031, 0x8861079);
+ _vm->_soundMan->playSoundThree(0x002D0031, 0x08861079);
SetMessageHandler(&GameModule::handleMessage);
}
@@ -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,19 @@ 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);
+ }
+}
+
+void GameModule::handleWheelUp() {
+ if (_childObject) {
+ sendMessage(_childObject, NM_MOUSE_WHEELUP, 0);
+ }
+}
+
+void GameModule::handleWheelDown() {
+ if (_childObject) {
+ sendMessage(_childObject, NM_MOUSE_WHEELDOWN, 0);
}
}
@@ -415,6 +427,8 @@ void GameModule::checkRequests() {
_vm->_audioResourceMan->stopAllSounds();
_vm->_soundMan->stopAllMusic();
_vm->_soundMan->stopAllSounds();
+ // Reinsert turning sound because SoundMan::stopAllSounds() removes it
+ _vm->_soundMan->playSoundThree(0x002D0031, 0x08861079);
delete _childObject;
delete _prevChildObject;
_childObject = NULL;