[Scummvm-cvs-logs] SF.net SVN: scummvm:[46334] scummvm/trunk/engines/teenagent

megath at users.sourceforge.net megath at users.sourceforge.net
Sat Dec 12 11:43:17 CET 2009


Revision: 46334
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46334&view=rev
Author:   megath
Date:     2009-12-12 10:43:17 +0000 (Sat, 12 Dec 2009)

Log Message:
-----------
added debug level to the dump() methods.

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/objects.cpp
    scummvm/trunk/engines/teenagent/objects.h
    scummvm/trunk/engines/teenagent/scene.cpp

Modified: scummvm/trunk/engines/teenagent/objects.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/objects.cpp	2009-12-12 10:31:48 UTC (rev 46333)
+++ scummvm/trunk/engines/teenagent/objects.cpp	2009-12-12 10:43:17 UTC (rev 46334)
@@ -86,8 +86,8 @@
 	name = new_name;
 }
 
-void Object::dump() const {
-	debug(0, "object: %u %u [%u,%u,%u,%u], actor: [%u,%u,%u,%u], orientation: %u, name: %s", id, enabled,
+void Object::dump(int level) const {
+	debug(level, "object: %u %u [%u,%u,%u,%u], actor: [%u,%u,%u,%u], orientation: %u, name: %s", id, enabled,
 		rect.left, rect.top, rect.right, rect.bottom,
 		actor_rect.left, actor_rect.top, actor_rect.right, actor_rect.bottom,
 		actor_orientation, name.c_str()
@@ -140,15 +140,15 @@
 	callback = in.readUint16LE();
 }
 
-void UseHotspot::dump() const {
-	debug(0, 
+void UseHotspot::dump(int level) const {
+	debug(level, 
 		"hotspot: inv_id: %02x, obj_id: %02x, orientation?: %02x, actor position: (%d,%d), callback: %04x", 
 		inventory_id, object_id, orientation, actor_x, actor_y, callback
 	);
 }
 
-void Walkbox::dump() const {
-	debug(0, "walkbox %02x %02x [%d, %d, %d, %d] top: %u, right: %u, bottom: %u, left: %u",
+void Walkbox::dump(int level) const {
+	debug(level, "walkbox %02x %02x [%d, %d, %d, %d] top: %u, right: %u, bottom: %u, left: %u",
 		type, orientation,
 		rect.left, rect.top, rect.right, rect.bottom,
 		side_hint[0], side_hint[1], side_hint[2], side_hint[3]);

Modified: scummvm/trunk/engines/teenagent/objects.h
===================================================================
--- scummvm/trunk/engines/teenagent/objects.h	2009-12-12 10:31:48 UTC (rev 46333)
+++ scummvm/trunk/engines/teenagent/objects.h	2009-12-12 10:43:17 UTC (rev 46334)
@@ -54,8 +54,8 @@
 
 	void render(Graphics::Surface *surface, uint8 color) const;
 
-	void dump() const {
-		debug(0, "rect[%u, %u, %u, %u]", left, top, right, bottom);
+	void dump(int level = 0) const {
+		debug(level, "rect[%u, %u, %u, %u]", left, top, right, bottom);
 	}
 
 	inline void clear() {
@@ -167,7 +167,7 @@
 	Common::String name, description;
 
 	Object(): _base(NULL) {}
-	void dump() const;
+	void dump(int level = 0) const;
 	void setName(const Common::String &name);
 	void load(byte *addr);
 	void save() const;
@@ -197,7 +197,7 @@
 	uint16 actor_x, actor_y;
 	uint16 callback;
 	void load(byte *src);
-	void dump() const;
+	void dump(int level = 0) const;
 };
 
 struct Walkbox {
@@ -207,7 +207,7 @@
 	byte side_hint[4];
 
 	Walkbox() : _base(NULL) {}
-	void dump() const;
+	void dump(int level = 0) const;
 	void load(byte *src);
 	void save() const;
 

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2009-12-12 10:31:48 UTC (rev 46333)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2009-12-12 10:43:17 UTC (rev 46334)
@@ -82,7 +82,7 @@
 				continue;
 			}
 			
-			w.dump();
+			w.dump(1);
 			debug(1, "%u: intersection mask 0x%04x, searching hints", *wi, mask);
 			int dx = p2.x - p1.x, dy = p2.y - p1.y;
 			if (dx >= 0) {


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