mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
ZVISION: Allow dumping any file type via the new "dumpfiles" command
This commit is contained in:
parent
85644b8879
commit
c2d83d287f
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user