diff options
-rw-r--r-- | engines/sherlock/debugger.cpp | 12 | ||||
-rw-r--r-- | engines/sherlock/debugger.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp index b3c64e8e82..50293db648 100644 --- a/engines/sherlock/debugger.cpp +++ b/engines/sherlock/debugger.cpp @@ -47,6 +47,7 @@ Debugger::Debugger(SherlockEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("scene", WRAP_METHOD(Debugger, cmdScene)); registerCmd("song", WRAP_METHOD(Debugger, cmdSong)); registerCmd("songs", WRAP_METHOD(Debugger, cmdListSongs)); + registerCmd("listfiles", WRAP_METHOD(Debugger, cmdListFiles)); registerCmd("dumpfile", WRAP_METHOD(Debugger, cmdDumpFile)); registerCmd("locations", WRAP_METHOD(Debugger, cmdLocations)); } @@ -114,6 +115,17 @@ bool Debugger::cmdListSongs(int argc, const char **argv) { return true; } +bool Debugger::cmdListFiles(int argc, const char **argv) { + if (argc != 2) { + debugPrintf("Format: listfiles <resource file>\n"); + return true; + } + Common::StringArray files; + _vm->_res->getResourceNames(Common::String(argv[1]), files); + debugPrintColumns(files); + return true; +} + bool Debugger::cmdDumpFile(int argc, const char **argv) { if (argc != 2) { debugPrintf("Format: dumpfile <resource name>\n"); diff --git a/engines/sherlock/debugger.h b/engines/sherlock/debugger.h index 622098cf85..bcc4448c32 100644 --- a/engines/sherlock/debugger.h +++ b/engines/sherlock/debugger.h @@ -55,6 +55,11 @@ private: bool cmdListSongs(int argc, const char **argv); /** + * Lists all files in a library (use at your own risk) + */ + bool cmdListFiles(int argc, const char **argv); + + /** * Dumps a file to disk */ bool cmdDumpFile(int argc, const char **argv); |