[Scummvm-cvs-logs] SF.net SVN: scummvm: [26829] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun May 13 14:38:31 CEST 2007


Revision: 26829
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26829&view=rev
Author:   peres001
Date:     2007-05-13 05:38:29 -0700 (Sun, 13 May 2007)

Log Message:
-----------
Added new debugger commands.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/debug.cpp
    scummvm/trunk/engines/parallaction/debug.h

Modified: scummvm/trunk/engines/parallaction/debug.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/debug.cpp	2007-05-13 11:07:00 UTC (rev 26828)
+++ scummvm/trunk/engines/parallaction/debug.cpp	2007-05-13 12:38:29 UTC (rev 26829)
@@ -32,28 +32,28 @@
 
 
 const char *_jobDescriptions[] = {
-	"0 - draw label",
-	"1 - draw mouse",
-	"2 - delay remove Job (erase label) || show inventory",
-	"3 - draw animations",
-	"4 - NONE",
-	"5 - NONE",
-	"6 - NONE",
-	"7 - NONE",
-	"8 - NONE",
-	"9 - NONE",
-	"10 - NONE",
-	"11 - NONE",
-	"12 - NONE",
-	"13 - NONE",
-	"14 - NONE",
-	"15 - delay remove Job (erase label) || run scripts || erase animations",
-	"16 - NONE",
-	"17 - job_12d4 (put item on screen) || jobRemovePickedItem (remove item from screen)",
-	"18 - toggle door",
-	"19 - walk",
-	"20 - erase label || hide inventory",
-	"21 - erase mouse"
+	"draw label",
+	"draw mouse",
+	"delayed label deletion || show inventory",
+	"draw animations",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"NONE",
+	"delayed label deletion || run scripts || erase animations",
+	"NONE",
+	"put item || pickup item",
+	"toggle door",
+	"walk",
+	"erase label || hide inventory",
+	"erase mouse"
 };
 
 Debugger::Debugger(Parallaction *vm)
@@ -63,6 +63,11 @@
 	DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
 	DCmd_Register("location", WRAP_METHOD(Debugger, Cmd_Location));
 	DCmd_Register("give",     WRAP_METHOD(Debugger, Cmd_Give));
+	DCmd_Register("jobs",     WRAP_METHOD(Debugger, Cmd_Jobs));
+	DCmd_Register("zones",     WRAP_METHOD(Debugger, Cmd_Zones));
+	DCmd_Register("animations",     WRAP_METHOD(Debugger, Cmd_Animations));
+
+
 }
 
 
@@ -118,4 +123,58 @@
 	return true;
 }
 
+
+bool Debugger::Cmd_Jobs(int argc, const char **argv) {
+
+	JobList::iterator b = _vm->_jobs.begin();
+	JobList::iterator e = _vm->_jobs.end();
+
+	DebugPrintf("+---+-------------------------------------------------------------+\n"
+				"|tag| description                                                 |\n"
+				"+---+-------------------------------------------------------------+\n");
+	for ( ; b != e; b++) {
+		DebugPrintf("|%3i| %-60s|\n", (*b)->_tag, _jobDescriptions[(*b)->_tag] );
+	}
+	DebugPrintf("+---+-------------------------------------------------------------+\n");
+
+
+	return true;
+}
+
+bool Debugger::Cmd_Zones(int argc, const char **argv) {
+
+	ZoneList::iterator b = _vm->_zones.begin();
+	ZoneList::iterator e = _vm->_zones.end();
+
+	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n"
+				"| name               | l | t | r | b |  type  |  flag  |\n"
+				"+--------------------+---+---+---+---+--------+--------+\n");
+	for ( ; b != e; b++) {
+		Zone *z = *b;
+		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_label._text, z->_left, z->_top, z->_right, z->_bottom, z->_type, z->_flags );
+	}
+	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
+
+
+	return true;
+}
+
+bool Debugger::Cmd_Animations(int argc, const char **argv) {
+
+	AnimationList::iterator b = _vm->_animations.begin();
+	AnimationList::iterator e = _vm->_animations.end();
+
+	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n"
+				"| name               | x | y | z | f |  type  |  flag  | \n"
+				"+--------------------+---+---+---+---+--------+--------+\n");
+	for ( ; b != e; b++) {
+		Animation *a = *b;
+		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", a->_label._text, a->_left, a->_top, a->_z, a->_frame, a->_type, a->_flags );
+	}
+	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
+
+
+	return true;
+}
+
 } // namespace Parallaction

Modified: scummvm/trunk/engines/parallaction/debug.h
===================================================================
--- scummvm/trunk/engines/parallaction/debug.h	2007-05-13 11:07:00 UTC (rev 26828)
+++ scummvm/trunk/engines/parallaction/debug.h	2007-05-13 12:38:29 UTC (rev 26829)
@@ -22,6 +22,10 @@
 	bool Cmd_DebugLevel(int argc, const char **argv);
 	bool Cmd_Location(int argc, const char **argv);
 	bool Cmd_Give(int argc, const char **argv);
+	bool Cmd_Jobs(int argc, const char **argv);
+	bool Cmd_Zones(int argc, const char **argv);
+	bool Cmd_Animations(int argc, const char **argv);
+
 };
 
 } // End of namespace Parallaction


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