diff options
author | Filippos Karapetis | 2014-12-22 02:50:34 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-22 02:50:34 +0200 |
commit | c2d83d287faec2bdfd6fac7d665c156670c7b7f7 (patch) | |
tree | 7cfabc2c5108c9ff94bbd1149c1089b0435f2a4d /engines | |
parent | 85644b887944dc4fc261827ae812a4e4684651bb (diff) | |
download | scummvm-rg350-c2d83d287faec2bdfd6fac7d665c156670c7b7f7.tar.gz scummvm-rg350-c2d83d287faec2bdfd6fac7d665c156670c7b7f7.tar.bz2 scummvm-rg350-c2d83d287faec2bdfd6fac7d665c156670c7b7f7.zip |
ZVISION: Allow dumping any file type via the new "dumpfiles" command
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/core/console.cpp | 11 | ||||
-rw-r--r-- | engines/zvision/core/console.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp index 0789f8d4fb..07d3114ec8 100644 --- a/engines/zvision/core/console.cpp +++ b/engines/zvision/core/console.cpp @@ -52,7 +52,7 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) { registerCmd("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale)); registerCmd("location", WRAP_METHOD(Console, cmdLocation)); registerCmd("dumpfile", WRAP_METHOD(Console, cmdDumpFile)); - registerCmd("dumpallscripts", WRAP_METHOD(Console, cmdDumpAllScripts)); + registerCmd("dumpfiles", WRAP_METHOD(Console, cmdDumpFiles)); } bool Console::cmdLoadVideo(int argc, const char **argv) { @@ -237,12 +237,17 @@ bool Console::cmdDumpFile(int argc, const char **argv) { return true; } -bool Console::cmdDumpAllScripts(int argc, const char **argv) { +bool Console::cmdDumpFiles(int argc, const char **argv) { Common::String fileName; Common::SeekableReadStream *in; + if (argc != 2) { + debugPrintf("Use %s <file extension> to dump all files with a specific extension\n", argv[0]); + return true; + } + SearchManager::MatchList fileList; - _engine->getSearchManager()->listMembersWithExtension(fileList, "scr"); + _engine->getSearchManager()->listMembersWithExtension(fileList, argv[1]); for (SearchManager::MatchList::iterator iter = fileList.begin(); iter != fileList.end(); ++iter) { fileName = iter->_value.name; diff --git a/engines/zvision/core/console.h b/engines/zvision/core/console.h index 7e27fe8f26..a7bd88ebc3 100644 --- a/engines/zvision/core/console.h +++ b/engines/zvision/core/console.h @@ -46,7 +46,7 @@ private: bool cmdSetPanoramaScale(int argc, const char **argv); bool cmdLocation(int argc, const char **argv); bool cmdDumpFile(int argc, const char **argv); - bool cmdDumpAllScripts(int argc, const char **argv); + bool cmdDumpFiles(int argc, const char **argv); }; } // End of namespace ZVision |