aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-03 13:44:29 -0500
committerrichiesams2013-08-04 13:33:06 -0500
commit8d5e92b935966fdae84182dd7e7845280fb38ad4 (patch)
tree8f50c495e410b9acd0addee798a355b22bcd7b68 /engines
parent87be3180c73c16af0609f9e734d499233d69784f (diff)
downloadscummvm-rg350-8d5e92b935966fdae84182dd7e7845280fb38ad4.tar.gz
scummvm-rg350-8d5e92b935966fdae84182dd7e7845280fb38ad4.tar.bz2
scummvm-rg350-8d5e92b935966fdae84182dd7e7845280fb38ad4.zip
ZVISION: Add console cmd for changing location
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/console.cpp13
-rw-r--r--engines/zvision/console.h1
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