From 8dd601d35e26c7a50ee8cabf3ec69ba72e268d20 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 May 2009 19:59:42 +0000 Subject: Moved the "dump" and "dissectscript" commands to console.cpp and renamed them to "hexdump" and "dissect_script" respectively svn-id: r40818 --- engines/sci/engine/sciconsole.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/sciconsole.cpp b/engines/sci/engine/sciconsole.cpp index 7f90eed87c..38027ce184 100644 --- a/engines/sci/engine/sciconsole.cpp +++ b/engines/sci/engine/sciconsole.cpp @@ -43,11 +43,9 @@ static int c_man(EngineState *s, const Common::Array &cmdParams); / static int c_set(EngineState *s, const Common::Array &cmdParams); // sets an int variable static int c_print(EngineState *s, const Common::Array &cmdParams); // prints a variable static int c_size(EngineState *s, const Common::Array &cmdParams); // displays the size of a resource -static int c_dump(EngineState *s, const Common::Array &cmdParams); // gives a hex dump of a resource //static int c_objinfo(EngineState *s, const Common::Array &cmdParams); // shows some info about one class //static int c_objmethods(EngineState *s, const Common::Array &cmdParams); // Disassembles all methods of a class static int c_hexgrep(EngineState *s, const Common::Array &cmdParams); // Searches a string in one resource or resource class -static int c_dissectscript(EngineState *s, const Common::Array &cmdParams); // Splits a script into objects and explains them struct cmd_mm_entry_t { const char *name; @@ -171,11 +169,9 @@ void con_init() { con_hook_command(&c_print, "print", "s", "Prints an int variable"); con_hook_command(&c_set, "set", "si", "Sets an int variable"); con_hook_command(&c_size, "size", "si", "Displays the size of a resource"); - con_hook_command(&c_dump, "dump", "si", "HexDumps a resource"); con_hook_command(&c_hexgrep, "hexgrep", "shh*", "Searches some resources for a\n" " particular sequence of bytes, re-\n presented as hexadecimal numbers.\n\n" "EXAMPLES:\n hexgrep script e8 03 c8 00\n hexgrep pic.042 fe"); - con_hook_command(&c_dissectscript, "dissectscript", "i", "Examines a script."); con_hook_page("addresses", "Passing address parameters\n\n" " Address parameters may be passed in one of\n" @@ -850,22 +846,6 @@ static int c_size(EngineState *s, const Common::Array &cmdParams) { return 0; } -static int c_dump(EngineState *s, const Common::Array &cmdParams) { - ResourceType res = parseResourceType(cmdParams[0].str); - - if (res == kResourceTypeInvalid) - sciprintf("Resource type '%s' is not valid\n", cmdParams[0].str); - else { - Resource *resource = s->resmgr->findResource(res, cmdParams[1].val, 0); - if (resource) - Common::hexdump(resource->data, resource->size, 16, 0); - else - sciprintf("Resource %s.%03d not found\n", cmdParams[0].str, cmdParams[1].val); - } - - return 0; -} - static int c_hexgrep(EngineState *s, const Common::Array &cmdParams) { int i, seeklen, resnr, resmax; unsigned char *seekstr = NULL; @@ -939,16 +919,6 @@ static int c_hexgrep(EngineState *s, const Common::Array &cmdParams return 0; } -static int c_dissectscript(EngineState *s, const Common::Array &cmdParams) { - if (NULL == s) { - sciprintf("console.c: c_dissectscript(): NULL passed for parameter s\n"); - return -1; - } - - script_dissect(s->resmgr, cmdParams[0].val, s->_selectorNames); - return 0; -} - #endif // SCI_CONSOLE } // End of namespace Sci -- cgit v1.2.3