From f67e0042b046c57526f72d8f33b7c36b5508a66a Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 7 Aug 2013 15:26:59 -0500 Subject: ZVISION: Create console method to dump all cursor file names --- engines/zvision/console.cpp | 17 +++++++++++++++++ engines/zvision/console.h | 1 + 2 files changed, 18 insertions(+) (limited to 'engines/zvision') diff --git a/engines/zvision/console.cpp b/engines/zvision/console.cpp index 6634e0bef4..f9b4e7008a 100644 --- a/engines/zvision/console.cpp +++ b/engines/zvision/console.cpp @@ -48,6 +48,7 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) { DCmd_Register("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale)); DCmd_Register("changelocation", WRAP_METHOD(Console, cmdChangeLocation)); DCmd_Register("dumpfile", WRAP_METHOD(Console, cmdDumpFile)); + DCmd_Register("dumpcursorfilenames", WRAP_METHOD(Console, cmdDumpAllCursorFileNames)); } bool Console::cmdLoadImage(int argc, const char **argv) { @@ -175,4 +176,20 @@ bool Console::cmdDumpFile(int argc, const char **argv) { return true; } +bool Console::cmdDumpAllCursorFileNames(int argc, const char **argv) { + Common::DumpFile outputFile; + outputFile.open("cursorFileNames.txt"); + + Common::ArchiveMemberList list; + SearchMan.listMatchingMembers(list, "*.zcr"); + + // Register the file entries within the zfs archives with the SearchMan + for (Common::ArchiveMemberList::iterator iter = list.begin(); iter != list.end(); ++iter) { + outputFile.writeString((*iter)->getName()); + outputFile.writeByte('\n'); + } + + return true; +} + } // End of namespace ZVision diff --git a/engines/zvision/console.h b/engines/zvision/console.h index be3ebf10dc..3c08f20768 100644 --- a/engines/zvision/console.h +++ b/engines/zvision/console.h @@ -47,6 +47,7 @@ private: bool cmdSetPanoramaScale(int argc, const char **argv); bool cmdChangeLocation(int argc, const char **argv); bool cmdDumpFile(int argc, const char **argv); + bool cmdDumpAllCursorFileNames(int argc, const char **argv); }; } // End of namespace ZVision -- cgit v1.2.3