From ecfb2e5b5dd61b434951f0e6d95536d4b981569e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 30 May 2009 16:36:37 +0000 Subject: - Moved the print_port, segment_info and segment_kill console commands to console.cpp - Removed the unused gfx driver debug flags svn-id: r41036 --- engines/sci/console.cpp | 241 ++++++++++++++++++++++++++++++- engines/sci/console.h | 6 + engines/sci/engine/scriptdebug.cpp | 288 ++----------------------------------- engines/sci/gfx/gfx_driver.cpp | 1 - engines/sci/gfx/gfx_driver.h | 8 -- 5 files changed, 254 insertions(+), 290 deletions(-) (limited to 'engines') diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index d001cb0143..a4d11ec587 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -33,6 +33,7 @@ #include "sci/engine/state.h" #include "sci/engine/gc.h" #include "sci/gfx/gfx_state_internal.h" +#include "sci/gfx/gfx_widgets.h" // for gfxw_find_port #include "sci/vocabulary.h" #include "common/savefile.h" @@ -69,12 +70,15 @@ Console::Console(SciEngine *vm) : GUI::Debugger() { DCmd_Register("class_table", WRAP_METHOD(Console, cmdClassTable)); DCmd_Register("parser_words", WRAP_METHOD(Console, cmdParserWords)); DCmd_Register("current_port", WRAP_METHOD(Console, cmdCurrentPort)); + DCmd_Register("print_port", WRAP_METHOD(Console, cmdPrintPort)); DCmd_Register("parse_grammar", WRAP_METHOD(Console, cmdParseGrammar)); DCmd_Register("visual_state", WRAP_METHOD(Console, cmdVisualState)); DCmd_Register("dynamic_views", WRAP_METHOD(Console, cmdDynamicViews)); DCmd_Register("dropped_views", WRAP_METHOD(Console, cmdDroppedViews)); DCmd_Register("simkey", WRAP_METHOD(Console, cmdSimulateKey)); DCmd_Register("segment_table", WRAP_METHOD(Console, cmdPrintSegmentTable)); + DCmd_Register("segment_info", WRAP_METHOD(Console, cmdSegmentInfo)); + DCmd_Register("segment_kill", WRAP_METHOD(Console, cmdKillSegment)); DCmd_Register("show_map", WRAP_METHOD(Console, cmdShowMap)); DCmd_Register("gc", WRAP_METHOD(Console, cmdInvokeGC)); DCmd_Register("gc_objects", WRAP_METHOD(Console, cmdGCObjects)); @@ -562,9 +566,40 @@ bool Console::cmdParserWords(int argc, const char **argv) { bool Console::cmdCurrentPort(int argc, const char **argv) { if (!g_EngineState->port) - DebugPrintf("Current port number: none.\n"); + DebugPrintf("There is no port active currently.\n"); else - DebugPrintf("Current port number: %d\n", g_EngineState->port->_ID); + DebugPrintf("Current port ID: %d\n", g_EngineState->port->_ID); + + return true; +} + +bool Console::cmdPrintPort(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Prints information about a port\n"); + DebugPrintf("%s current - prints information about the current port\n", argv[0]); + DebugPrintf("%s - prints information about the port with the specified ID\n", argv[0]); + return true; + } + + GfxPort *port; + + if (!scumm_stricmp(argv[1], "current")) { + port = g_EngineState->port; + if (!port) + DebugPrintf("There is no active port currently\n"); + else + port->print(0); + } else { + if (!g_EngineState->visual) { + DebugPrintf("Visual is uninitialized\n"); + } else { + port = gfxw_find_port(g_EngineState->visual, atoi(argv[1])); + if (!port) + DebugPrintf("No such port\n"); + else + port->print(0); + } + } return true; } @@ -686,6 +721,208 @@ bool Console::cmdPrintSegmentTable(int argc, const char **argv) { return true; } +bool Console::segmentInfo(int nr) { + DebugPrintf("[%04x] ", nr); + + if ((nr < 0) || ((uint)nr >= g_EngineState->seg_manager->_heap.size()) || !g_EngineState->seg_manager->_heap[nr]) + return false; + + MemObject *mobj = g_EngineState->seg_manager->_heap[nr]; + + switch (mobj->getType()) { + + case MEM_OBJ_SCRIPT: { + Script *scr = (Script *)mobj; + DebugPrintf("script.%03d locked by %d, bufsize=%d (%x)\n", scr->nr, scr->lockers, (uint)scr->buf_size, (uint)scr->buf_size); + if (scr->export_table) + DebugPrintf(" Exports: %4d at %d\n", scr->exports_nr, (int)(((byte *)scr->export_table) - ((byte *)scr->buf))); + else + DebugPrintf(" Exports: none\n"); + + DebugPrintf(" Synonyms: %4d\n", scr->synonyms_nr); + + if (scr->locals_block) + DebugPrintf(" Locals : %4d in segment 0x%x\n", scr->locals_block->_locals.size(), scr->locals_segment); + else + DebugPrintf(" Locals : none\n"); + + DebugPrintf(" Objects: %4d\n", scr->_objects.size()); + for (uint i = 0; i < scr->_objects.size(); i++) { + DebugPrintf(" "); + // Object header + Object *obj = obj_get(g_EngineState, scr->_objects[i].pos); + if (obj) + DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(scr->_objects[i].pos), + obj_get_name(g_EngineState, scr->_objects[i].pos), obj->_variables.size(), obj->methods_nr); + } + } + break; + + case MEM_OBJ_LOCALS: { + LocalVariables *locals = (LocalVariables *)mobj; + DebugPrintf("locals for script.%03d\n", locals->script_id); + DebugPrintf(" %d (0x%x) locals\n", locals->_locals.size(), locals->_locals.size()); + } + break; + + case MEM_OBJ_STACK: { + DataStack *stack = (DataStack *)mobj; + DebugPrintf("stack\n"); + DebugPrintf(" %d (0x%x) entries\n", stack->nr, stack->nr); + } + break; + + case MEM_OBJ_SYS_STRINGS: { + DebugPrintf("system string table - viewing currently disabled\n"); +#if 0 + SystemStrings *strings = &(mobj->data.sys_strings); + + for (int i = 0; i < SYS_STRINGS_MAX; i++) + if (strings->strings[i].name) + DebugPrintf(" %s[%d]=\"%s\"\n", strings->strings[i].name, strings->strings[i].max_size, strings->strings[i].value); +#endif + } + break; + + case MEM_OBJ_CLONES: { + CloneTable *ct = (CloneTable *)mobj; + + DebugPrintf("clones\n"); + + for (uint i = 0; i < ct->_table.size(); i++) + if (ct->isValidEntry(i)) { + reg_t objpos; + objpos.offset = i; + objpos.segment = nr; + DebugPrintf(" [%04x] %s; copy of ", i, obj_get_name(g_EngineState, objpos)); + // Object header + Object *obj = obj_get(g_EngineState, ct->_table[i].pos); + if (obj) + DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct->_table[i].pos), + obj_get_name(g_EngineState, ct->_table[i].pos), obj->_variables.size(), obj->methods_nr); + } + } + break; + + case MEM_OBJ_LISTS: { + ListTable *lt = (ListTable *)mobj; + + DebugPrintf("lists\n"); + for (uint i = 0; i < lt->_table.size(); i++) + if (lt->isValidEntry(i)) { + DebugPrintf(" [%04x]: ", i); + printList(&(lt->_table[i])); + } + } + break; + + case MEM_OBJ_NODES: { + DebugPrintf("nodes (total %d)\n", (*(NodeTable *)mobj).entries_used); + break; + } + + case MEM_OBJ_HUNK: { + HunkTable *ht = (HunkTable *)mobj; + + DebugPrintf("hunk (total %d)\n", ht->entries_used); + for (uint i = 0; i < ht->_table.size(); i++) + if (ht->isValidEntry(i)) { + DebugPrintf(" [%04x] %d bytes at %p, type=%s\n", + i, ht->_table[i].size, ht->_table[i].mem, ht->_table[i].type); + } + } + break; + + case MEM_OBJ_DYNMEM: { + DebugPrintf("dynmem (%s): %d bytes\n", + (*(DynMem *)mobj)._description ? (*(DynMem *)mobj)._description : "no description", (*(DynMem *)mobj)._size); + + Common::hexdump((*(DynMem *)mobj)._buf, (*(DynMem *)mobj)._size, 16, 0); + } + break; + + case MEM_OBJ_STRING_FRAG: { + DebugPrintf("string frags\n"); + break; + } + + default : + DebugPrintf("Invalid type %d\n", mobj->getType()); + break; + } + + DebugPrintf("\n"); + return true; +} + +void Console::printList(List *l) { + reg_t pos = l->first; + reg_t my_prev = NULL_REG; + + DebugPrintf("\t<\n"); + + while (!pos.isNull()) { + Node *node; + NodeTable *nt = (NodeTable *)GET_SEGMENT(*g_EngineState->seg_manager, pos.segment, MEM_OBJ_NODES); + + if (!nt || !nt->isValidEntry(pos.offset)) { + DebugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n", + PRINT_REG(pos)); + return; + } + + node = &(nt->_table[pos.offset]); + + sciprintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value)); + + if (my_prev != node->pred) + DebugPrintf(" WARNING: current node gives %04x:%04x as predecessor!\n", + PRINT_REG(node->pred)); + + my_prev = pos; + pos = node->succ; + } + + if (my_prev != l->last) + DebugPrintf(" WARNING: Last node was expected to be %04x:%04x, was %04x:%04x!\n", + PRINT_REG(l->last), PRINT_REG(my_prev)); + DebugPrintf("\t>\n"); +} + +bool Console::cmdSegmentInfo(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Provides information on the specified segment(s)\n"); + DebugPrintf("Usage: %s \n", argv[0]); + DebugPrintf(" can be a number, which shows the information of the segment with\n"); + DebugPrintf("the specified number, or \"all\" to show information on all active segments"); + return true; + } + + if (!scumm_stricmp(argv[1], "all")) { + for (uint i = 0; i < g_EngineState->seg_manager->_heap.size(); i++) + segmentInfo(i); + } else { + int nr = atoi(argv[1]); + if (!segmentInfo(nr)) + DebugPrintf("Segment %04x does not exist\n", nr); + } + + return true; +} + + +bool Console::cmdKillSegment(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Deletes the specified segment\n"); + DebugPrintf("Usage: %s \n", argv[0]); + return true; + } + + g_EngineState->seg_manager->getScript(atoi(argv[1]))->setLockers(0); + + return true; +} + bool Console::cmdShowMap(int argc, const char **argv) { if (argc != 2) { DebugPrintf("Shows one of the screen maps\n"); diff --git a/engines/sci/console.h b/engines/sci/console.h index 1e4fc9a1f8..5916ec828b 100644 --- a/engines/sci/console.h +++ b/engines/sci/console.h @@ -63,17 +63,23 @@ private: bool cmdClassTable(int argc, const char **argv); bool cmdParserWords(int argc, const char **argv); bool cmdCurrentPort(int argc, const char **argv); + bool cmdPrintPort(int argc, const char **argv); bool cmdParseGrammar(int argc, const char **argv); bool cmdVisualState(int argc, const char **argv); bool cmdDynamicViews(int argc, const char **argv); bool cmdDroppedViews(int argc, const char **argv); bool cmdSimulateKey(int argc, const char **argv); bool cmdPrintSegmentTable(int argc, const char **argv); + bool cmdSegmentInfo(int argc, const char **argv); + bool cmdKillSegment(int argc, const char **argv); bool cmdShowMap(int argc, const char **argv); bool cmdInvokeGC(int argc, const char **argv); bool cmdGCObjects(int argc, const char **argv); bool cmdExit(int argc, const char **argv); + bool segmentInfo(int nr); + void printList(List *l); + private: SciEngine *_vm; }; diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 51abf580b2..b54aae338b 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -296,176 +296,6 @@ int c_sfx_01_track(EngineState *s, const Common::Array &cmdParams) return 0; } -static void print_obj_head(EngineState *s, reg_t pos) { - Object *obj = obj_get(s, pos); - - if (!obj) - return; - - sciprintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), obj_get_name(s, pos), - obj->_variables.size(), obj->methods_nr); -} - -static void print_list(EngineState *s, List *l) { - reg_t pos = l->first; - reg_t my_prev = NULL_REG; - - sciprintf("\t<\n"); - - while (!pos.isNull()) { - Node *node; - NodeTable *nt = (NodeTable *)GET_SEGMENT(*s->seg_manager, pos.segment, MEM_OBJ_NODES); - - if (!nt || !nt->isValidEntry(pos.offset)) { - sciprintf(" WARNING: %04x:%04x: Doesn't contain list node!\n", - PRINT_REG(pos)); - return; - } - - node = &(nt->_table[pos.offset]); - - sciprintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value)); - - if (my_prev != node->pred) - sciprintf(" WARNING: current node gives %04x:%04x as predecessor!\n", - PRINT_REG(node->pred)); - - my_prev = pos; - pos = node->succ; - } - - if (my_prev != l->last) - sciprintf(" WARNING: Last node was expected to be %04x:%04x, was %04x:%04x!\n", - PRINT_REG(l->last), PRINT_REG(my_prev)); - sciprintf("\t>\n"); -} - -static bool _c_single_seg_info(EngineState *s, int nr) { - sciprintf("[%04x] ", nr); - - if ((nr < 0) || ((uint)nr >= s->seg_manager->_heap.size()) || !s->seg_manager->_heap[nr]) - return false; - - MemObject *mobj = s->seg_manager->_heap[nr]; - - switch (mobj->getType()) { - - case MEM_OBJ_SCRIPT: { - Script *scr = (Script *)mobj; - sciprintf("script.%03d locked by %d, bufsize=%d (%x)\n", scr->nr, scr->lockers, (uint)scr->buf_size, (uint)scr->buf_size); - if (scr->export_table) - sciprintf(" Exports: %4d at %d\n", scr->exports_nr, (int)(((byte *)scr->export_table) - ((byte *)scr->buf))); - else - sciprintf(" Exports: none\n"); - - sciprintf(" Synynms: %4d\n", scr->synonyms_nr); - - if (scr->locals_block) - sciprintf(" Locals : %4d in segment 0x%x\n", scr->locals_block->_locals.size(), scr->locals_segment); - else - sciprintf(" Locals : none\n"); - - sciprintf(" Objects: %4d\n", scr->_objects.size()); - for (uint i = 0; i < scr->_objects.size(); i++) { - sciprintf(" "); - print_obj_head(s, scr->_objects[i].pos); - } - } - break; - - case MEM_OBJ_LOCALS: { - LocalVariables *locals = (LocalVariables *)mobj; - sciprintf("locals for script.%03d\n", locals->script_id); - sciprintf(" %d (0x%x) locals\n", locals->_locals.size(), locals->_locals.size()); - } - break; - - case MEM_OBJ_STACK: { - DataStack *stack = (DataStack *)mobj; - sciprintf("stack\n"); - sciprintf(" %d (0x%x) entries\n", stack->nr, stack->nr); - } - break; - - case MEM_OBJ_SYS_STRINGS: { - sciprintf("system string table - viewing currently disabled\n"); -#if 0 - SystemStrings *strings = &(mobj->data.sys_strings); - - for (int i = 0; i < SYS_STRINGS_MAX; i++) - if (strings->strings[i].name) - sciprintf(" %s[%d]=\"%s\"\n", strings->strings[i].name, strings->strings[i].max_size, strings->strings[i].value); -#endif - } - break; - - case MEM_OBJ_CLONES: { - CloneTable *ct = (CloneTable *)mobj; - - sciprintf("clones\n"); - - for (uint i = 0; i < ct->_table.size(); i++) - if (ct->isValidEntry(i)) { - reg_t objpos; - objpos.offset = i; - objpos.segment = nr; - sciprintf(" [%04x] %s; copy of ", i, obj_get_name(s, objpos)); - print_obj_head(s, ct->_table[i].pos); - } - } - break; - - case MEM_OBJ_LISTS: { - ListTable *lt = (ListTable *)mobj; - - sciprintf("lists\n"); - for (uint i = 0; i < lt->_table.size(); i++) - if (lt->isValidEntry(i)) { - sciprintf(" [%04x]: ", i); - print_list(s, &(lt->_table[i])); - } - } - break; - - case MEM_OBJ_NODES: { - sciprintf("nodes (total %d)\n", (*(NodeTable *)mobj).entries_used); - break; - } - - case MEM_OBJ_HUNK: { - HunkTable *ht = (HunkTable *)mobj; - - sciprintf("hunk (total %d)\n", ht->entries_used); - for (uint i = 0; i < ht->_table.size(); i++) - if (ht->isValidEntry(i)) { - sciprintf(" [%04x] %d bytes at %p, type=%s\n", - i, ht->_table[i].size, ht->_table[i].mem, ht->_table[i].type); - } - } - break; - - case MEM_OBJ_DYNMEM: { - sciprintf("dynmem (%s): %d bytes\n", - (*(DynMem *)mobj)._description ? (*(DynMem *)mobj)._description : "no description", (*(DynMem *)mobj)._size); - - Common::hexdump((*(DynMem *)mobj)._buf, (*(DynMem *)mobj)._size, 16, 0); - } - break; - - case MEM_OBJ_STRING_FRAG: { - sciprintf("string frags\n"); - break; - } - - default : - sciprintf("Invalid type %d\n", mobj->getType()); - break; - } - - sciprintf("\n"); - return true; -} - static int show_node(EngineState *s, reg_t addr) { MemObject *mobj = GET_SEGMENT(*s->seg_manager, addr.segment, MEM_OBJ_LISTS); @@ -554,10 +384,13 @@ static int c_vr(EngineState *s, const Common::Array &cmdParams) { sciprintf("list\n"); + // TODO: printList has been moved to console.cpp + /* if (l) - print_list(s, l); + printList(l); else sciprintf("Invalid list.\n"); + */ } break; @@ -610,17 +443,6 @@ static int c_vr(EngineState *s, const Common::Array &cmdParams) { return 0; } -int c_segkill(EngineState *s, const Common::Array &cmdParams) { - uint i = 0; - - while (i < cmdParams.size()) { - int nr = cmdParams[i++].val; - - s->seg_manager->getScript(nr)->setLockers(0); - } - return 0; -} - static int c_mousepos(EngineState *s, const Common::Array &cmdParams) { sci_event_t event; @@ -633,24 +455,6 @@ static int c_mousepos(EngineState *s, const Common::Array &cmdParam return 0; } -int c_seginfo(EngineState *s, const Common::Array &cmdParams) { - uint i = 0; - - if (cmdParams.size()) { - while (i < cmdParams.size()) { - int nr = cmdParams[i++].val; - if (!_c_single_seg_info(s, nr)) - sciprintf("Segment %04x does not exist\n", nr); - } - } else { - for (i = 0; i < s->seg_manager->_heap.size(); i++) { - _c_single_seg_info(s, i); - } - } - - return 0; -} - int c_debuginfo(EngineState *s) { if (!_debugstate_valid) { sciprintf("Not in debug state\n"); @@ -1454,7 +1258,7 @@ static int c_visible_map(EngineState *s, const Common::Array &cmdPa return 1; } - //WARNING(fixme!) + // TODO #if 0 if (s->onscreen_console) con_restore_screen(s, s->osc_backup); @@ -1469,33 +1273,6 @@ static int c_visible_map(EngineState *s, const Common::Array &cmdPa return 0; } -static int c_gfx_print_port(EngineState *s, const Common::Array &cmdParams) { - GfxPort *port; - - if (!_debugstate_valid) { - sciprintf("Not in debug state\n"); - return 1; - } - - port = s->port; - - if (cmdParams.size() > 0) { - if (s->visual) { - port = gfxw_find_port(s->visual, cmdParams[0].val); - } else { - sciprintf("visual is uninitialized.\n"); - return 1; - } - } - - if (port) - port->print(0); - else - sciprintf("No such port.\n"); - - return 0; -} - static int c_gfx_priority(EngineState *s, const Common::Array &cmdParams) { if (!_debugstate_valid) { sciprintf("Not in debug state\n"); @@ -2027,20 +1804,6 @@ static int c_sfx_remove(EngineState *s, const Common::Array &cmdPar return 0; } -#define GFX_DEBUG_MODES 4 - -int c_gfx_debuglog(EngineState *s, const Common::Array &cmdParams) { - gfx_driver_t *drv = s->gfx_state->driver; - const generic_config_flag_t gfx_debug_modes[GFX_DEBUG_MODES] = { - { "Mouse Pointer", 'p', GFX_DEBUG_POINTER}, - { "Updates", 'u', GFX_DEBUG_UPDATES}, - { "Pixmap operations", 'x', GFX_DEBUG_PIXMAPS}, - { "Basic operations", 'b', GFX_DEBUG_BASIC}, - }; - - return c_handle_config_update(gfx_debug_modes, GFX_DEBUG_MODES, "graphics subsystem", (int *)&(drv->debug_flags), cmdParams); -} - static int c_is_sample(EngineState *s, const Common::Array &cmdParams) { Resource *song = s->resmgr->findResource(kResourceTypeSound, cmdParams[0].val, 0); SongIterator *songit; @@ -2167,7 +1930,9 @@ int objinfo(EngineState *s, reg_t pos) { return 1; } - print_obj_head(s, pos); + // Object header + sciprintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), obj_get_name(s, pos), + obj->_variables.size(), obj->methods_nr); if (!(obj->_variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS)) var_container = obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]); @@ -2608,34 +2373,12 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * " Deactivates the debug features listed in X\n\n" " Debug features:\n" " s: Active song changes\n" - " c: Song cues\n" - "SEE ALSO\n" - " debuglog.1, gfx_debuglog.1\n"); - con_hook_command(c_gfx_debuglog, "gfx_debuglog", "s*", - "Sets or prints the gfx driver's debug\n" - "settings\n\n" - "USAGE\n\n" - " gfx_debuglog {[+|-][p|u|x|b]+}*\n\n" - " gfx_debuglog\n\n" - " Prints current settings\n\n" - " gfx_debuglog +X\n\n" - " Activates all debug features listed in X\n\n" - " gfx_debuglog -X\n\n" - " Deactivates the debug features listed in X\n\n" - " Debug features:\n" - " p: Pointer\n" - " u: Updates\n" - " x: Pixmaps\n" - " b: Basic features\n\n" - "SEE ALSO\n" - " debuglog.1, sfx_debuglog.1\n"); + " c: Song cues\n"); #ifdef GFXW_DEBUG_WIDGETS con_hook_command(c_gfx_print_widget, "gfx_print_widget", "i*", "If called with no parameters, it\n shows which widgets are active.\n" " With parameters, it lists the\n widget corresponding to the\n numerical index specified (for\n each parameter)."); #endif - con_hook_command(c_gfx_print_port, "gfx_print_port", "i*", "Displays all information about the\n specified port," - " or the current port\n if no port was specified."); con_hook_command(c_gfx_drawpic, "gfx_drawpic", "ii*", "Draws a pic resource\n\nUSAGE\n gfx_drawpic [ []]\n" " where is the number of the pic resource\n to draw\n is the optional default\n palette for the pic (0 is" "\n assumed if not specified)\n are any pic draw flags (default\n is 1)"); @@ -2661,19 +2404,6 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * con_hook_command(c_gfx_priority, "gfx_priority", "i*", "Prints information about priority\n bands\nUSAGE\n\n gfx_priority\n\n" " will print the min and max values\n for the priority bands\n\n gfx_priority \n\n Print start of the priority\n" " band for the specified\n priority\n"); - con_hook_command(c_segkill, "segkill", "!i*", - "Deletes the specified segment\n\n" - "USAGE\n\n" - " segkill \n"); - con_hook_command(c_seginfo, "seginfo", "!i*", - "Explains the specified segment\n\n" - "USAGE\n\n" - " seginfo\n" - " seginfo \n" - " Either explains all active segments\n" - " (no parameter) or the specified one.\n\n" - "SEE ALSO\n\n" - " segtable.1"); con_hook_command(c_vo, "vo", "!a", "Examines an object\n\n" "SEE ALSO\n\n" diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 8ee2b3977e..2418f45824 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -307,7 +307,6 @@ static int scummvm_set_pointer(gfx_driver_t *drv, gfx_pixmap_t *pointer, Common: gfx_driver_t gfx_driver_scummvm = { NULL, 0, 0, - 0, // flags here 0, NULL, scummvm_init, diff --git a/engines/sci/gfx/gfx_driver.h b/engines/sci/gfx/gfx_driver.h index 634fe072e0..254f619b34 100644 --- a/engines/sci/gfx/gfx_driver.h +++ b/engines/sci/gfx/gfx_driver.h @@ -42,11 +42,6 @@ enum gfx_buffer_t { #define GFX_CAPABILITY_SHADING (1<<0) #define GFX_CAPABILITY_STIPPLED_LINES (1<<6) -#define GFX_DEBUG_POINTER (1<<0) -#define GFX_DEBUG_UPDATES (1<<1) -#define GFX_DEBUG_PIXMAPS (1<<2) -#define GFX_DEBUG_BASIC (1<<3) /* Basic geometric ops (lines, boxes, etc) */ - /* Principial graphics driver architecture ** --------------------------------------- ** @@ -92,9 +87,6 @@ struct gfx_driver_t { /* Graphics driver */ ** horizontally and vertically (xl = 0 or yl = 0). */ - unsigned int debug_flags; /* Driver debug flags */ - - /*** Initialization ***/ int (*set_parameter)(gfx_driver_t *drv, char *attribute, char *value); -- cgit v1.2.3