diff options
author | Bastien Bouclet | 2016-11-01 19:19:26 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | 14bbf8aab4ed187ec1e6da9e61a1acf6601d0332 (patch) | |
tree | 05d0ca49831dc96351a95da6347559e5f5909bac /engines/mohawk/console.cpp | |
parent | e2c5609e81d3a54e0d3c63427288f3c261b86ade (diff) | |
download | scummvm-rg350-14bbf8aab4ed187ec1e6da9e61a1acf6601d0332.tar.gz scummvm-rg350-14bbf8aab4ed187ec1e6da9e61a1acf6601d0332.tar.bz2 scummvm-rg350-14bbf8aab4ed187ec1e6da9e61a1acf6601d0332.zip |
MOHAWK: Move the external commands to their respective stacks
Diffstat (limited to 'engines/mohawk/console.cpp')
-rw-r--r-- | engines/mohawk/console.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp index 3f6f241a23..64d3a00ef8 100644 --- a/engines/mohawk/console.cpp +++ b/engines/mohawk/console.cpp @@ -42,9 +42,9 @@ #ifdef ENABLE_RIVEN #include "mohawk/riven.h" #include "mohawk/riven_card.h" -#include "mohawk/riven_external.h" #include "mohawk/riven_sound.h" #include "mohawk/riven_stack.h" +#include "mohawk/riven_stacks/domespit.h" #endif namespace Mohawk { @@ -675,11 +675,11 @@ bool RivenConsole::Cmd_Combos(int argc, const char **argv) { debugPrintf("Telescope Combo:\n "); for (int i = 0; i < 5; i++) - debugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(teleCombo, i)); + debugPrintf("%d ", _vm->getStack()->getComboDigit(teleCombo, i)); debugPrintf("\nPrison Combo:\n "); for (int i = 0; i < 5; i++) - debugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(prisonCombo, i)); + debugPrintf("%d ", _vm->getStack()->getComboDigit(prisonCombo, i)); debugPrintf("\nDome Combo:\n "); for (int i = 1; i <= 25; i++) @@ -691,10 +691,16 @@ bool RivenConsole::Cmd_Combos(int argc, const char **argv) { } bool RivenConsole::Cmd_SliderState(int argc, const char **argv) { + RivenStacks::DomeSpit *domeSpit = dynamic_cast<RivenStacks::DomeSpit *>(_vm->getStack()); + if (!domeSpit) { + debugPrintf("No dome in this stack\n"); + return true; + } + if (argc > 1) - _vm->_externalScriptHandler->setDomeSliderState((uint32)atoi(argv[1])); + domeSpit->setDomeSliderState((uint32)atoi(argv[1])); - debugPrintf("Dome Slider State = %08x\n", _vm->_externalScriptHandler->getDomeSliderState()); + debugPrintf("Dome Slider State = %08x\n", domeSpit->getDomeSliderState()); return true; } |