diff options
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/console.cpp | 13 | ||||
-rw-r--r-- | engines/zvision/console.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/zvision/console.cpp b/engines/zvision/console.cpp index 3dad7af376..aaf43c598f 100644 --- a/engines/zvision/console.cpp +++ b/engines/zvision/console.cpp @@ -29,6 +29,7 @@ #include "zvision/console.h" #include "zvision/zvision.h" +#include "zvision/script_manager.h" #include "zvision/render_manager.h" #include "zvision/zork_avi_decoder.h" #include "zvision/zork_raw.h" @@ -45,6 +46,7 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) { DCmd_Register("generaterendertable", WRAP_METHOD(Console, cmdGenerateRenderTable)); DCmd_Register("setpanoramafov", WRAP_METHOD(Console, cmdSetPanoramaFoV)); DCmd_Register("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale)); + DCmd_Register("changelocation", WRAP_METHOD(Console, cmdChangeLocation)); } bool Console::cmdLoadImage(int argc, const char **argv) { @@ -150,4 +152,15 @@ bool Console::cmdSetPanoramaScale(int argc, const char **argv) { return true; } +bool Console::cmdChangeLocation(int argc, const char **argv) { + if (argc != 6) { + DebugPrintf("Use changelocation <char: world> <char: room> <char:node> <char:view> <int: x position> to change your location"); + return true; + } + + _engine->getScriptManager()->changeLocation(*(argv[1]), *(argv[2]), *(argv[3]), *(argv[4]), atoi(argv[5])); + + return true; +} + } // End of namespace ZVision diff --git a/engines/zvision/console.h b/engines/zvision/console.h index 7b1beeb304..d7d2ce904b 100644 --- a/engines/zvision/console.h +++ b/engines/zvision/console.h @@ -45,6 +45,7 @@ private: bool cmdGenerateRenderTable(int argc, const char **argv); bool cmdSetPanoramaFoV(int argc, const char **argv); bool cmdSetPanoramaScale(int argc, const char **argv); + bool cmdChangeLocation(int argc, const char **argv); }; } // End of namespace ZVision |