[Scummvm-cvs-logs] SF.net SVN: scummvm:[41036] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat May 30 18:36:38 CEST 2009


Revision: 41036
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41036&view=rev
Author:   thebluegr
Date:     2009-05-30 16:36:37 +0000 (Sat, 30 May 2009)

Log Message:
-----------
- Moved the print_port, segment_info and segment_kill console commands to console.cpp
- Removed the unused gfx driver debug flags

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/console.h
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
    scummvm/trunk/engines/sci/gfx/gfx_driver.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-05-30 15:52:09 UTC (rev 41035)
+++ scummvm/trunk/engines/sci/console.cpp	2009-05-30 16:36:37 UTC (rev 41036)
@@ -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 @@
 	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,13 +566,44 @@
 
 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 <ID> - 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;
+}
+
 bool Console::cmdParseGrammar(int argc, const char **argv) {
 	DebugPrintf("Parse grammar, in strict GNF:\n");
 
@@ -686,6 +721,208 @@
 	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 <segment number>\n", argv[0]);
+		DebugPrintf("<segment number> 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 <segment number>\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");

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2009-05-30 15:52:09 UTC (rev 41035)
+++ scummvm/trunk/engines/sci/console.h	2009-05-30 16:36:37 UTC (rev 41036)
@@ -63,17 +63,23 @@
 	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;
 };

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-30 15:52:09 UTC (rev 41035)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-30 16:36:37 UTC (rev 41036)
@@ -296,176 +296,6 @@
 	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 @@
 
 			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 @@
 	return 0;
 }
 
-int c_segkill(EngineState *s, const Common::Array<cmd_param_t> &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<cmd_param_t> &cmdParams) {
 	sci_event_t event;
 
@@ -633,24 +455,6 @@
 	return 0;
 }
 
-int c_seginfo(EngineState *s, const Common::Array<cmd_param_t> &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 @@
 		return 1;
 	}
 
-	//WARNING(fixme!)
+	// TODO
 #if 0
 	if (s->onscreen_console)
 		con_restore_screen(s, s->osc_backup);
@@ -1469,33 +1273,6 @@
 	return 0;
 }
 
-static int c_gfx_print_port(EngineState *s, const Common::Array<cmd_param_t> &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<cmd_param_t> &cmdParams) {
 	if (!_debugstate_valid) {
 		sciprintf("Not in debug state\n");
@@ -2027,20 +1804,6 @@
 	return 0;
 }
 
-#define GFX_DEBUG_MODES 4
-
-int c_gfx_debuglog(EngineState *s, const Common::Array<cmd_param_t> &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<cmd_param_t> &cmdParams) {
 	Resource *song = s->resmgr->findResource(kResourceTypeSound, cmdParams[0].val, 0);
 	SongIterator *songit;
@@ -2167,7 +1930,9 @@
 		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 @@
 			                 "    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 <nr> [<pal> [<fl>]]\n"
 			                 "  where <nr> is the number of the pic resource\n  to draw\n  <pal> is the optional default\n  palette for the pic (0 is"
 			                 "\n  assumed if not specified)\n  <fl> are any pic draw flags (default\n  is 1)");
@@ -2661,19 +2404,6 @@
 			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 <val>\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 <nr>\n");
-			con_hook_command(c_seginfo, "seginfo", "!i*",
-			                 "Explains the specified segment\n\n"
-			                 "USAGE\n\n"
-			                 "  seginfo\n"
-			                 "  seginfo <nr>\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"

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-05-30 15:52:09 UTC (rev 41035)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-05-30 16:36:37 UTC (rev 41036)
@@ -307,7 +307,6 @@
 gfx_driver_t gfx_driver_scummvm = {
 	NULL,
 	0, 0,
-	0,		// flags here
 	0,
 	NULL,
 	scummvm_init,

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.h	2009-05-30 15:52:09 UTC (rev 41035)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.h	2009-05-30 16:36:37 UTC (rev 41036)
@@ -42,11 +42,6 @@
 #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 @@
 	**    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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list