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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Oct 21 15:13:56 CEST 2010


Revision: 53673
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53673&view=rev
Author:   thebluegr
Date:     2010-10-21 13:13:56 +0000 (Thu, 21 Oct 2010)

Log Message:
-----------
SCI: Added the ability to filter out results of the "class_table" command

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-10-21 09:32:00 UTC (rev 53672)
+++ scummvm/trunk/engines/sci/console.cpp	2010-10-21 13:13:56 UTC (rev 53673)
@@ -1141,14 +1141,18 @@
 }
 
 bool Console::cmdClassTable(int argc, const char **argv) {
-	DebugPrintf("Available classes:\n");
+	DebugPrintf("Available classes (parse a parameter to filter the table by a specific class):\n");
+
 	for (uint i = 0; i < _engine->_gamestate->_segMan->classTableSize(); i++) {
 		Class temp = _engine->_gamestate->_segMan->_classTable[i];
 		if (temp.reg.segment) {
-			DebugPrintf(" Class 0x%x (%s) at %04x:%04x (script 0x%x)\n", i,
-					_engine->_gamestate->_segMan->getObjectName(temp.reg),
-					PRINT_REG(temp.reg),
-					temp.script);
+			const char *className = _engine->_gamestate->_segMan->getObjectName(temp.reg);
+			if (argc == 1 || (argc == 2 && !strcmp(className, argv[1]))) {
+				DebugPrintf(" Class 0x%x (%s) at %04x:%04x (script %d)\n", i,
+						className,
+						PRINT_REG(temp.reg),
+						temp.script);
+			}
 		}
 	}
 


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