diff options
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst_stacks/stoneship.cpp | 38 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/stoneship.h | 8 |
2 files changed, 30 insertions, 16 deletions
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp index f430c1924d..7c8fecf6fa 100644 --- a/engines/mohawk/myst_stacks/stoneship.cpp +++ b/engines/mohawk/myst_stacks/stoneship.cpp @@ -83,6 +83,8 @@ void MystScriptParser_Stoneship::setupOpcodes() { OPCODE(118, o_chestDropKey); OPCODE(119, o_trapLockOpen); OPCODE(120, o_sideDoorsMovies); + OPCODE(121, o_cloudOrbEnter); + OPCODE(122, o_cloudOrbLeave); OPCODE(125, o_drawerCloseOpened); // "Init" Opcodes @@ -96,7 +98,7 @@ void MystScriptParser_Stoneship::setupOpcodes() { OPCODE(207, o_chest_init); OPCODE(208, opcode_208); OPCODE(209, o_achenarDrawers_init); - OPCODE(210, opcode_210); + OPCODE(210, o_cloudOrb_init); // "Exit" Opcodes OPCODE(300, opcode_300); @@ -689,6 +691,21 @@ void MystScriptParser_Stoneship::o_sideDoorsMovies(uint16 op, uint16 var, uint16 _vm->_cursor->showCursor(); } +void MystScriptParser_Stoneship::o_cloudOrbEnter(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Cloud orb enter", op); + + _vm->_sound->replaceSoundMyst(_cloudOrbSound, Audio::Mixer::kMaxChannelVolume, true); + _cloudOrbMovie->playMovie(); +} + +void MystScriptParser_Stoneship::o_cloudOrbLeave(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Cloud orb leave", op); + + _cloudOrbMovie->pauseMovie(true); + _vm->_sound->replaceSoundMyst(_cloudOrbStopSound); + _vm->_gfx->runTransition(5, _invokingResource->getRect(), 4, 0); +} + void MystScriptParser_Stoneship::o_drawerCloseOpened(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Close open drawer", op); @@ -860,21 +877,12 @@ void MystScriptParser_Stoneship::o_achenarDrawers_init(uint16 op, uint16 var, ui } } -void MystScriptParser_Stoneship::opcode_210(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - varUnusedCheck(op, var); - - // Used in Cards 2205 and 2207 (Cloud Orbs in Sirrus' Room) - if (argc == 2) { - uint16 soundId = argv[0]; - uint16 soundIdStopping = argv[1]; +void MystScriptParser_Stoneship::o_cloudOrb_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + debugC(kDebugScript, "Opcode %d: Cloud orb init", op); - // TODO: Work Out Function i.e. control Var etc. - if (false) { - _vm->_sound->replaceSoundMyst(soundId); - _vm->_sound->replaceSoundMyst(soundIdStopping); - } - } else - unknown(op, var, argc, argv); + _cloudOrbMovie = static_cast<MystResourceType6 *>(_invokingResource); + _cloudOrbSound = argv[0]; + _cloudOrbStopSound = argv[1]; } void MystScriptParser_Stoneship::opcode_300(uint16 op, uint16 var, uint16 argc, uint16 *argv) { diff --git a/engines/mohawk/myst_stacks/stoneship.h b/engines/mohawk/myst_stacks/stoneship.h index 3f8cee2b49..af77aeda03 100644 --- a/engines/mohawk/myst_stacks/stoneship.h +++ b/engines/mohawk/myst_stacks/stoneship.h @@ -68,6 +68,8 @@ private: DECLARE_OPCODE(o_chestDropKey); DECLARE_OPCODE(o_trapLockOpen); DECLARE_OPCODE(o_sideDoorsMovies); + DECLARE_OPCODE(o_cloudOrbEnter); + DECLARE_OPCODE(o_cloudOrbLeave); DECLARE_OPCODE(o_drawerCloseOpened); DECLARE_OPCODE(o_hologramDisplay_init); @@ -80,7 +82,7 @@ private: DECLARE_OPCODE(o_chest_init); DECLARE_OPCODE(opcode_208); DECLARE_OPCODE(o_achenarDrawers_init); - DECLARE_OPCODE(opcode_210); + DECLARE_OPCODE(o_cloudOrb_init); DECLARE_OPCODE(opcode_300); @@ -107,6 +109,10 @@ private: MystResourceType6 *_hologramSelection; // 88 uint16 _hologramDisplayPos; + MystResourceType6 *_cloudOrbMovie; // 136 + uint16 _cloudOrbSound; // 140 + uint16 _cloudOrbStopSound; // 142 + uint16 batteryRemainingCharge(); }; |