diff options
author | richiesams | 2013-08-04 23:02:43 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 23:52:21 -0500 |
commit | a86a0832e08c777ef23f2ce97004963b301dd598 (patch) | |
tree | 26e22721514a1c9dd36c458f794e39d2f4404f69 | |
parent | 0a8f57721bdc2f907e2fb42083341f81fabd9dce (diff) | |
download | scummvm-rg350-a86a0832e08c777ef23f2ce97004963b301dd598.tar.gz scummvm-rg350-a86a0832e08c777ef23f2ce97004963b301dd598.tar.bz2 scummvm-rg350-a86a0832e08c777ef23f2ce97004963b301dd598.zip |
ZVISION: Create console method for dumping a file by name
-rw-r--r-- | engines/zvision/console.cpp | 12 | ||||
-rw-r--r-- | engines/zvision/console.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/zvision/console.cpp b/engines/zvision/console.cpp index aaf43c598f..9c7d79a8f1 100644 --- a/engines/zvision/console.cpp +++ b/engines/zvision/console.cpp @@ -47,6 +47,7 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) { DCmd_Register("setpanoramafov", WRAP_METHOD(Console, cmdSetPanoramaFoV)); DCmd_Register("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale)); DCmd_Register("changelocation", WRAP_METHOD(Console, cmdChangeLocation)); + DCmd_Register("dumpfile", WRAP_METHOD(Console, cmdDumpFile)); } bool Console::cmdLoadImage(int argc, const char **argv) { @@ -163,4 +164,15 @@ bool Console::cmdChangeLocation(int argc, const char **argv) { return true; } +bool Console::cmdDumpFile(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Use dumpfile <fileName> to dump a file"); + return true; + } + + writeFileContentsToFile(argv[1], argv[1]); + + return true; +} + } // End of namespace ZVision diff --git a/engines/zvision/console.h b/engines/zvision/console.h index d7d2ce904b..be3ebf10dc 100644 --- a/engines/zvision/console.h +++ b/engines/zvision/console.h @@ -46,6 +46,7 @@ private: bool cmdSetPanoramaFoV(int argc, const char **argv); bool cmdSetPanoramaScale(int argc, const char **argv); bool cmdChangeLocation(int argc, const char **argv); + bool cmdDumpFile(int argc, const char **argv); }; } // End of namespace ZVision |