From 3fba66021097569fd6d5c97b05cb43c3b5150393 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Fri, 11 Aug 2017 08:24:34 +0200 Subject: MOHAWK: Riven: Fix pin rotation handle sometimes disappearing It was due to inaccurate rotation movie bounds. Fixes #10086. --- engines/mohawk/riven_stacks/gspit.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'engines/mohawk') diff --git a/engines/mohawk/riven_stacks/gspit.cpp b/engines/mohawk/riven_stacks/gspit.cpp index 1e3441a6a7..05f46c60dc 100644 --- a/engines/mohawk/riven_stacks/gspit.cpp +++ b/engines/mohawk/riven_stacks/gspit.cpp @@ -95,12 +95,17 @@ void GSpit::xgrotatepins(const ArgumentArray &args) { return; uint32 &pinPos = _vm->_vars["gpinpos"]; - uint32 startTime = (pinPos - 1) * 1200; - if (pinPos == 4) + static const uint32 pinPosTimes[] = { + 8416, 0, 1216, 2416, 3616, 4846, 6016, 7216 + }; + + uint32 startTime = pinPosTimes[pinPos]; + pinPos++; + uint32 endTime = pinPosTimes[pinPos]; + + if (pinPos > 4) pinPos = 1; - else - pinPos++; // Play the rotating sound _vm->_sound->playSound(12); @@ -109,7 +114,7 @@ void GSpit::xgrotatepins(const ArgumentArray &args) { RivenVideo *video = _vm->_video->openSlot(_vm->_vars["gupmoov"]); video->enable(); video->seek(startTime); - video->playBlocking(startTime + 1215); + video->playBlocking(endTime); video->disable(); } -- cgit v1.2.3