diff options
Diffstat (limited to 'engines/chewy/console.cpp')
-rw-r--r-- | engines/chewy/console.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp index cb2d5e21c1..6fbd99278f 100644 --- a/engines/chewy/console.cpp +++ b/engines/chewy/console.cpp @@ -26,6 +26,7 @@ #include "chewy/console.h" #include "chewy/graphics.h" #include "chewy/resource.h" +#include "chewy/scene.h" #include "chewy/sound.h" #include "chewy/text.h" @@ -43,6 +44,7 @@ Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("error_message", WRAP_METHOD(Console, Cmd_ErrorMessage)); registerCmd("dialog", WRAP_METHOD(Console, Cmd_Dialog)); registerCmd("text", WRAP_METHOD(Console, Cmd_Text)); + registerCmd("scene", WRAP_METHOD(Console, Cmd_Scene)); } Console::~Console() { @@ -235,4 +237,17 @@ bool Console::Cmd_Text(int argc, const char **argv) { return true; } +bool Console::Cmd_Scene(int argc, const char **argv) { + if (argc < 2) { + debugPrintf("Current scene is: %d\n", _vm->_scene->getCurScene()); + debugPrintf("Use scene <scene num> to change the scene\n"); + return true; + } + + int sceneNum = atoi(argv[1]); + _vm->_scene->change(sceneNum); + + return false; +} + } // End of namespace Chewy |