diff options
author | Bastien Bouclet | 2017-08-11 08:24:34 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-08-11 08:24:34 +0200 |
commit | 3fba66021097569fd6d5c97b05cb43c3b5150393 (patch) | |
tree | 70ec8588aca292e90f526f9de1d9f6695b686398 /engines/mohawk | |
parent | 49383e0aee3b669007b4f2e62eb9912a375ad7b9 (diff) | |
download | scummvm-rg350-3fba66021097569fd6d5c97b05cb43c3b5150393.tar.gz scummvm-rg350-3fba66021097569fd6d5c97b05cb43c3b5150393.tar.bz2 scummvm-rg350-3fba66021097569fd6d5c97b05cb43c3b5150393.zip |
MOHAWK: Riven: Fix pin rotation handle sometimes disappearing
It was due to inaccurate rotation movie bounds.
Fixes #10086.
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/riven_stacks/gspit.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
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(); } |