void Stoneship::o_generatorStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Generator start", op); MystResourceType11 *handle = static_cast<MystResourceType11 *>(_invokingResource); uint16 soundId = handle->getList1(0); if (soundId) _vm->_sound->replaceSoundMyst(soundId); if (_state.generatorDuration) _state.generatorDuration -= _vm->_system->getMillis() - _state.generatorDepletionTime; // Start charging the battery _batteryDepleting = false; _batteryCharging = true; _batteryNextTime = _vm->_system->getMillis() + 1000; // Start handle movie MystResourceType6 *movie = static_cast<MystResourceType6 *>(handle->getSubResource(0)); movie->playMovie(); soundId = handle->getList2(0); if (soundId) _vm->_sound->replaceSoundMyst(soundId, Audio::Mixer::kMaxChannelVolume, true); }
void Mechanical::o_birdCrankStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Mechanical bird crank start", op); MystResourceType11 *crank = static_cast<MystResourceType11 *>(_invokingResource); uint16 crankSoundId = crank->getList2(0); _vm->_sound->replaceSoundMyst(crankSoundId, Audio::Mixer::kMaxChannelVolume, true); _birdSingEndTime = 0; _birdCrankStartTime = _vm->_system->getMillis(); MystResourceType6 *crankMovie = static_cast<MystResourceType6 *>(crank->getSubResource(0)); crankMovie->playMovie(); }
void MystScriptParser::o_triggerMovie(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Trigger Type 6 Resource Movie..", op); // TODO: If movie has sound, pause background music int16 direction = 1; if (argc == 1) direction = argv[0]; debugC(kDebugScript, "\tDirection: %d", direction); // Trigger resource 6 movie overriding play direction MystResourceType6 *resource = static_cast<MystResourceType6 *>(_invokingResource); resource->setDirection(direction); resource->playMovie(); // TODO: If movie has sound, resume background music }