diff options
author | Filippos Karapetis | 2009-05-29 08:59:13 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-29 08:59:13 +0000 |
commit | c95e5fceeeefb1e52c6456224626680930ecbd84 (patch) | |
tree | 09e1a9ef01ef7285f2afafdd19884c53ee9d9f03 /engines/sci/engine | |
parent | 0ad3b7bb7d47492d85206095ec5ea27b2905628a (diff) | |
download | scummvm-rg350-c95e5fceeeefb1e52c6456224626680930ecbd84.tar.gz scummvm-rg350-c95e5fceeeefb1e52c6456224626680930ecbd84.tar.bz2 scummvm-rg350-c95e5fceeeefb1e52c6456224626680930ecbd84.zip |
Moved the "size" console debugger command to console.cpp and silenced a warning
svn-id: r40978
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/game.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/sciconsole.cpp | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 41e262a480..b8af8bdc34 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -323,7 +323,7 @@ static int create_class_table_sci0(EngineState *s) { // Map the class ID to the script the corresponding class is contained in // The script number is found in vocab.996, if it exists - if (!vocab996 || classnr >= vocab996->size >> 2) + if (!vocab996 || (uint32)classnr >= vocab996->size >> 2) sugg_script = -1; else sugg_script = (int16)READ_LE_UINT16(vocab996->data + 2 + (classnr << 2)); diff --git a/engines/sci/engine/sciconsole.cpp b/engines/sci/engine/sciconsole.cpp index 7332a22193..9177a4b11f 100644 --- a/engines/sci/engine/sciconsole.cpp +++ b/engines/sci/engine/sciconsole.cpp @@ -40,7 +40,6 @@ static int c_list(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); static int c_man(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // 'manual page' static int c_set(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // sets an int variable static int c_print(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // prints a variable -static int c_size(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // displays the size of a resource //static int c_objinfo(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // shows some info about one class //static int c_objmethods(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // Disassembles all methods of a class static int c_hexgrep(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // Searches a string in one resource or resource class @@ -166,7 +165,6 @@ void con_init() { con_hook_command(&c_man, "man", "s", "Gives a short description of something"); 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_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"); @@ -829,21 +827,6 @@ static int c_print(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) return 0; } -static int c_size(EngineState *s, const Common::Array<cmd_param_t> &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) { - sciprintf("Size: %d\n", resource->size); - } 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<cmd_param_t> &cmdParams) { int i, seeklen, resnr, resmax; unsigned char *seekstr = NULL; |