diff options
author | richiesams | 2013-08-24 00:25:21 -0500 |
---|---|---|
committer | richiesams | 2013-08-24 00:25:21 -0500 |
commit | a596d1241cf0b443d3c2f8099546bc620116dcb2 (patch) | |
tree | 3b6f3103f14b464887dcabea5bcedf88ac8f8005 /engines/zvision | |
parent | a9db1e17124639dfbd856f59afbf396d3c60452b (diff) | |
download | scummvm-rg350-a596d1241cf0b443d3c2f8099546bc620116dcb2.tar.gz scummvm-rg350-a596d1241cf0b443d3c2f8099546bc620116dcb2.tar.bz2 scummvm-rg350-a596d1241cf0b443d3c2f8099546bc620116dcb2.zip |
ZVISION: Add console method to dump all .lev files
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/console.cpp | 13 | ||||
-rw-r--r-- | engines/zvision/console.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/zvision/console.cpp b/engines/zvision/console.cpp index 69d19ab53a..fd8347e74f 100644 --- a/engines/zvision/console.cpp +++ b/engines/zvision/console.cpp @@ -53,6 +53,7 @@ Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) { DCmd_Register("dumpfile", WRAP_METHOD(Console, cmdDumpFile)); DCmd_Register("dumpcursorfilenames", WRAP_METHOD(Console, cmdDumpAllCursorFileNames)); DCmd_Register("showcursor", WRAP_METHOD(Console, cmdShowCursor)); + DCmd_Register("dumpalllevfiles", WRAP_METHOD(Console, cmdDumpAllLevFiles)); } bool Console::cmdLoadImage(int argc, const char **argv) { @@ -212,4 +213,16 @@ bool Console::cmdShowCursor(int argc, const char **argv) { return true; } +bool Console::cmdDumpAllLevFiles(int argc, const char **argv) { + Common::ArchiveMemberList list; + SearchMan.listMatchingMembers(list, "*.lev"); + + for (Common::ArchiveMemberList::iterator iter = list.begin(); iter != list.end(); ++iter) { + Common::String fileName = (*iter)->getName(); + writeFileContentsToFile(fileName, fileName); + } + + return true; +} + } // End of namespace ZVision diff --git a/engines/zvision/console.h b/engines/zvision/console.h index 995c41881e..e518467438 100644 --- a/engines/zvision/console.h +++ b/engines/zvision/console.h @@ -49,6 +49,7 @@ private: bool cmdDumpFile(int argc, const char **argv); bool cmdDumpAllCursorFileNames(int argc, const char **argv); bool cmdShowCursor(int argc, const char **argv); + bool cmdDumpAllLevFiles(int argc, const char **argv); }; } // End of namespace ZVision |