void MystScriptParser::o_changeCardDirectional(uint16 var, const ArgumentsArray &args) { // Used by Channelwood Card 3262 (In Elevator) uint16 cardId = args[0]; uint16 directionalUpdateDataSize = args[1]; _vm->changeToCard(cardId, kNoTransition); animatedUpdate(ArgumentsArray(args.begin() + 2, directionalUpdateDataSize), 0); }
void MystScriptParser::o_directionalUpdatePlaySound(uint16 var, const ArgumentsArray &args) { uint16 soundId = args[0]; uint16 delayBetweenSteps = args[1]; uint16 dataSize = args[2]; debugC(kDebugScript, "\tsound: %d", soundId); debugC(kDebugScript, "\tdelay between steps: %d", delayBetweenSteps); debugC(kDebugScript, "\tanimated update data size: %d", dataSize); if (soundId) _vm->_sound->playEffect(soundId); animatedUpdate(ArgumentsArray(args.begin() + 3, dataSize), delayBetweenSteps); }
void Mechanical::elevatorGoMiddle_run() { uint32 time = _vm->_system->getMillis(); if (_elevatorNextTime < time) { _elevatorNextTime = time + 1000; _elevatorTopCounter--; if (_elevatorTopCounter > 0) { // Draw button pressed if (_elevatorInCabin) { _vm->_gfx->copyImageSectionToScreen(6332, Common::Rect(0, 35, 51, 63), Common::Rect(10, 137, 61, 165)); } // Blip _vm->playSoundBlocking(14120); // Restore button if (_elevatorInCabin) { _vm->_gfx->copyBackBufferToScreen(Common::Rect(10, 137, 61, 165)); } } else { _elevatorTooLate = true; _elevatorGoingMiddle = false; if (_elevatorInCabin) { // Elevator going to middle animation _vm->_cursor->hideCursor(); _vm->playSoundBlocking(11120); _vm->_gfx->copyImageToBackBuffer(6118, Common::Rect(544, 333)); _vm->_sound->playEffect(12120); _vm->_gfx->runTransition(kTransitionSlideToLeft, Common::Rect(177, 0, 370, 333), 25, 0); _vm->playSoundBlocking(13120); _vm->_sound->playEffect(8120); _vm->_gfx->copyImageToBackBuffer(6327, Common::Rect(544, 333)); _vm->wait(500); _vm->_sound->playEffect(9120); static uint16 moviePos[2] = { 3540, 5380 }; o_elevatorWindowMovie(0, ArgumentsArray(moviePos, ARRAYSIZE(moviePos))); _vm->_gfx->copyBackBufferToScreen(Common::Rect(544, 333)); _vm->_sound->playEffect(10120); _vm->_cursor->showCursor(); _elevatorPosition = 1; _vm->changeToCard(6327, kTransitionRightToLeft); } } } }
void MystScriptParser::o_changeCardPlaySoundDirectional(uint16 var, const ArgumentsArray &args) { uint16 cardId = args[0]; uint16 soundId = args[1]; uint16 delayBetweenSteps = args[2]; uint16 dataSize = args[3]; debugC(kDebugScript, "\tcard: %d", cardId); debugC(kDebugScript, "\tsound: %d", soundId); debugC(kDebugScript, "\tdelay between steps: %d", delayBetweenSteps); debugC(kDebugScript, "\tanimated update data size: %d", dataSize); _vm->changeToCard(cardId, kNoTransition); if (soundId) _vm->_sound->playEffect(soundId); animatedUpdate(ArgumentsArray(args.begin() + 4, dataSize), delayBetweenSteps); }