diff options
author | Bastien Bouclet | 2010-11-29 20:50:40 +0000 |
---|---|---|
committer | Bastien Bouclet | 2010-11-29 20:50:40 +0000 |
commit | 16afca4c3ddb776bde8d882f229990f137a9c183 (patch) | |
tree | ad84f5dfef5c2ce74032a6888e1978be07c0d6bd /engines/mohawk/myst.cpp | |
parent | 49ed25157319e7c03bee29406249495dd16a9984 (diff) | |
download | scummvm-rg350-16afca4c3ddb776bde8d882f229990f137a9c183.tar.gz scummvm-rg350-16afca4c3ddb776bde8d882f229990f137a9c183.tar.bz2 scummvm-rg350-16afca4c3ddb776bde8d882f229990f137a9c183.zip |
MOHAWK: Add mouse move event for type 10 and 11 resources
svn-id: r54597
Diffstat (limited to 'engines/mohawk/myst.cpp')
-rw-r--r-- | engines/mohawk/myst.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index 3bd909938f..6e95df4b78 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -294,6 +294,10 @@ Common::Error MohawkEngine_Myst::run() { _mousePos = event.mouse; _needsUpdate = true; checkCurrentResource(); + if (_curResource >= 0) { + debug(2, "Sending mouse move event to resource %d\n", _curResource); + _resources[_curResource]->handleMouseMove(); + } break; case Common::EVENT_LBUTTONUP: if (_curResource >= 0) { @@ -1432,6 +1436,7 @@ MystResourceType10::MystResourceType10(MohawkEngine_Myst *vm, Common::SeekableRe } } + _mouseDown = false; warning("TODO: Card contains Type 10 Resource - Function not yet implemented"); } @@ -1452,7 +1457,7 @@ void MystResourceType10::handleMouseUp() { _vm->_scriptParser->runOpcode(_mouseUpOpcode); } -void MystResourceType10::handleAnimation() { +void MystResourceType10::handleMouseMove() { if (_mouseDown) { _vm->_scriptParser->runOpcode(_mouseDragOpcode); } @@ -1527,7 +1532,7 @@ void MystResourceType11::handleMouseUp() { _vm->_scriptParser->runOpcode(_mouseUpOpcode); } -void MystResourceType11::handleAnimation() { +void MystResourceType11::handleMouseMove() { if (_mouseDown) { _vm->_scriptParser->runOpcode(_mouseDragOpcode); } |