From 2f7a04ae95e8f3a555022a071d08a33667175e19 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 1 Jul 2017 22:46:35 +0200 Subject: [PATCH] MOHAWK: Check the Rebel island external commands against the original --- engines/mohawk/riven_stacks/rspit.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/engines/mohawk/riven_stacks/rspit.cpp b/engines/mohawk/riven_stacks/rspit.cpp index f99b7f4f39f1..cb029124a6ac 100644 --- a/engines/mohawk/riven_stacks/rspit.cpp +++ b/engines/mohawk/riven_stacks/rspit.cpp @@ -34,10 +34,10 @@ namespace RivenStacks { RSpit::RSpit(MohawkEngine_Riven *vm) : RivenStack(vm, kStackRspit) { -// REGISTER_COMMAND(RSpit, xrshowinventory); -// REGISTER_COMMAND(RSpit, xrhideinventory); -// REGISTER_COMMAND(RSpit, xrcredittime); -// REGISTER_COMMAND(RSpit, xrwindowsetup); + REGISTER_COMMAND(RSpit, xrshowinventory); + REGISTER_COMMAND(RSpit, xrhideinventory); + REGISTER_COMMAND(RSpit, xrcredittime); + REGISTER_COMMAND(RSpit, xrwindowsetup); } void RSpit::xrcredittime(uint16 argc, uint16 *argv) { @@ -52,14 +52,9 @@ void RSpit::xrcredittime(uint16 argc, uint16 *argv) { } void RSpit::xrshowinventory(uint16 argc, uint16 *argv) { - // Give the trap book and Catherine's journal to the player - _vm->_vars["atrapbook"] = 1; - _vm->_vars["acathbook"] = 1; - _vm->_inventory->show(); } void RSpit::xrhideinventory(uint16 argc, uint16 *argv) { - _vm->_inventory->hide(); } void RSpit::rebelPrisonWindowTimer() { @@ -67,10 +62,10 @@ void RSpit::rebelPrisonWindowTimer() { uint16 movie = _vm->_rnd->getRandomNumberRng(2, 13); _vm->getCard()->playMovie(movie); RivenVideo *video = _vm->_video->openSlot(movie); - video->play(); + video->playBlocking(); // Ensure the next video starts after this one ends - uint32 timeUntilNextVideo = video->getDuration() + _vm->_rnd->getRandomNumberRng(38, 58) * 1000; + uint32 timeUntilNextVideo = _vm->_rnd->getRandomNumberRng(38, 58) * 1000; // Save the time in case we leave the card and return _vm->_vars["rvillagetime"] = timeUntilNextVideo + _vm->getTotalPlayTime(); @@ -112,6 +107,5 @@ void RSpit::xrwindowsetup(uint16 argc, uint16 *argv) { installTimer(TIMER(RSpit, rebelPrisonWindowTimer), timeUntilNextVideo); } - } // End of namespace RivenStacks } // End of namespace Mohawk