diff options
author | Filippos Karapetis | 2017-01-08 20:20:47 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-01-08 20:24:39 +0200 |
commit | 4dc6aa2d93a3e166891713549d73c4e40fe9f4f2 (patch) | |
tree | 1284d83e82aef27f6bbf21314bac22285f2f30aa /engines/chewy/console.cpp | |
parent | f3ea11f402102f88750e98dd5b55779695ff832f (diff) | |
download | scummvm-rg350-4dc6aa2d93a3e166891713549d73c4e40fe9f4f2.tar.gz scummvm-rg350-4dc6aa2d93a3e166891713549d73c4e40fe9f4f2.tar.bz2 scummvm-rg350-4dc6aa2d93a3e166891713549d73c4e40fe9f4f2.zip |
CHEWY: Add console command to change scenes
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 |