Skip to content

Commit

Permalink
MOHAWK: Check the Rebel island external commands against the original
Browse files Browse the repository at this point in the history
  • Loading branch information
bgK authored and sev- committed Jul 3, 2017
1 parent 0f79e42 commit 2f7a04a
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions engines/mohawk/riven_stacks/rspit.cpp
Expand Up @@ -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) {
Expand All @@ -52,25 +52,20 @@ 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() {
// Randomize a video out in the middle of Tay
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();
Expand Down Expand Up @@ -112,6 +107,5 @@ void RSpit::xrwindowsetup(uint16 argc, uint16 *argv) {
installTimer(TIMER(RSpit, rebelPrisonWindowTimer), timeUntilNextVideo);
}


} // End of namespace RivenStacks
} // End of namespace Mohawk

0 comments on commit 2f7a04a

Please sign in to comment.