aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/core/console.cpp11
-rw-r--r--engines/zvision/core/console.h2
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