diff options
author | Vladimir Menshakov | 2009-12-12 10:43:17 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-12-12 10:43:17 +0000 |
commit | cc22b76c3b7bda4532f82a6eb11aa1a62479366e (patch) | |
tree | 72b78dae386170f02f47387a4530adab7cb58041 /engines/teenagent | |
parent | 581fd0c42db877ac11ce045525977c6e659a586a (diff) | |
download | scummvm-rg350-cc22b76c3b7bda4532f82a6eb11aa1a62479366e.tar.gz scummvm-rg350-cc22b76c3b7bda4532f82a6eb11aa1a62479366e.tar.bz2 scummvm-rg350-cc22b76c3b7bda4532f82a6eb11aa1a62479366e.zip |
added debug level to the dump() methods.
svn-id: r46334
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/objects.cpp | 12 | ||||
-rw-r--r-- | engines/teenagent/objects.h | 10 | ||||
-rw-r--r-- | engines/teenagent/scene.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp index e7f3c78666..fc4bec245a 100644 --- a/engines/teenagent/objects.cpp +++ b/engines/teenagent/objects.cpp @@ -86,8 +86,8 @@ void Object::setName(const Common::String &new_name) { 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 @@ void UseHotspot::load(byte *src) { 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]); diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index bab3830005..6838f6c49b 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -54,8 +54,8 @@ struct Rect { 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 @@ struct Object { 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 @@ struct UseHotspot { 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 @@ struct Walkbox { byte side_hint[4]; Walkbox() : _base(NULL) {} - void dump() const; + void dump(int level = 0) const; void load(byte *src); void save() const; diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index fdf7551fa6..dfe74fc0e8 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -82,7 +82,7 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi 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) { |