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 | |
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
-rw-r--r-- | engines/mohawk/myst.cpp | 9 | ||||
-rw-r--r-- | engines/mohawk/myst.h | 5 | ||||
-rw-r--r-- | engines/mohawk/myst_scripts_selenitic.cpp | 2 |
3 files changed, 11 insertions, 5 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); } diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h index a2852f191d..de433e089e 100644 --- a/engines/mohawk/myst.h +++ b/engines/mohawk/myst.h @@ -169,6 +169,7 @@ public: // Mouse interface virtual void handleMouseUp(); virtual void handleMouseDown() {} + virtual void handleMouseMove() {} virtual void handleMouseEnter() {} virtual void handleMouseLeave() {} @@ -253,9 +254,9 @@ class MystResourceType10 : public MystResourceType8 { public: MystResourceType10(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystResource *parent); virtual ~MystResourceType10(); - void handleAnimation(); void handleMouseDown(); void handleMouseUp(); + void handleMouseMove(); protected: uint16 _kind; @@ -277,9 +278,9 @@ class MystResourceType11 : public MystResourceType8 { public: MystResourceType11(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystResource *parent); virtual ~MystResourceType11(); - void handleAnimation(); void handleMouseDown(); void handleMouseUp(); + void handleMouseMove(); protected: uint16 _kind; diff --git a/engines/mohawk/myst_scripts_selenitic.cpp b/engines/mohawk/myst_scripts_selenitic.cpp index 098104c435..9289e7d715 100644 --- a/engines/mohawk/myst_scripts_selenitic.cpp +++ b/engines/mohawk/myst_scripts_selenitic.cpp @@ -514,7 +514,7 @@ void MystScriptParser_Selenitic::o_111_soundReceiverUpdateSound(uint16 op, uint1 void MystScriptParser_Selenitic::o_112_soundLockMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) { //varUnusedCheck(op, var); - //unknown(op, var, argc, argv); + unknown(op, var, argc, argv); } void MystScriptParser_Selenitic::o_113_soundLockStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) { |