void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Hologram move", op); MystResourceType11 *handle = static_cast<MystResourceType11 *>(_invokingResource); const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos(); if (handle->getRect().contains(mouse)) { int16 position = mouse.x - 143; position = CLIP<int16>(position, 0, 242); // Draw handle movie frame uint16 selectionPos = position * 1500 / 243; VideoHandle handleMovie = _hologramSelection->playMovie(); _vm->_video->setVideoBounds(handleMovie, Audio::Timestamp(0, selectionPos, 600), Audio::Timestamp(0, selectionPos, 600)); _hologramDisplayPos = position * 1450 / 243 + 350; // Draw display movie frame if (_hologramTurnedOn) { _hologramDisplay->setBlocking(false); VideoHandle displayMovie = _hologramDisplay->playMovie(); _vm->_video->setVideoBounds(displayMovie, Audio::Timestamp(0, _hologramDisplayPos, 600), Audio::Timestamp(0, _hologramDisplayPos, 600)); } } }
void Stoneship::o_telescopeMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) { debugC(kDebugScript, "Opcode %d: Telescope move", op); MystResourceType11 *display = static_cast<MystResourceType11 *>(_invokingResource); const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos(); // Compute telescope position _telescopePosition = (_telescopePosition - (mouse.x - _telescopeOldMouse) / 2 + 3240) % 3240; _telescopeOldMouse = mouse.x; // Copy image to screen Common::Rect src = Common::Rect(_telescopePosition, 0, _telescopePosition + 112, 112); _vm->_gfx->copyImageSectionToScreen(_telescopePanorama, src, display->getRect()); // Draw lighthouse telescopeLighthouseDraw(); _vm->_system->updateScreen(); }