diff options
author | Nicola Mettifogo | 2010-06-13 06:55:24 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2010-06-13 06:55:24 +0000 |
commit | 0659d5f2448cbea343d294146ba20f656f759f42 (patch) | |
tree | fe2a8b67c9cc018861b3de27d3ddaf51b799526a | |
parent | 2625c9b20be6ed4bef0fd8da600729a7316d7ac4 (diff) | |
download | scummvm-rg350-0659d5f2448cbea343d294146ba20f656f759f42.tar.gz scummvm-rg350-0659d5f2448cbea343d294146ba20f656f759f42.tar.bz2 scummvm-rg350-0659d5f2448cbea343d294146ba20f656f759f42.zip |
Improved debug output of BRA walk code.
svn-id: r49618
-rw-r--r-- | engines/parallaction/walk.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp index 8fc916e490..4468a7a678 100644 --- a/engines/parallaction/walk.cpp +++ b/engines/parallaction/walk.cpp @@ -450,7 +450,7 @@ void PathWalker_BR::buildPath(State &s, uint16 x, uint16 y) { Common::Point foot; s._a->getFoot(foot); - debugC(1, kDebugWalk, "buildPath: from (%i, %i) to (%i, %i)", foot.x, foot.y, x, y); + debugC(1, kDebugWalk, "buildPath: try to build path from (%i, %i) to (%i, %i)", foot.x, foot.y, x, y); s._walkPath.clear(); // look for easy path first @@ -465,13 +465,13 @@ void PathWalker_BR::buildPath(State &s, uint16 x, uint16 y) { ZonePtr z0 = _vm->hitZone(kZonePath, x, y); if (!z0) { s._walkPath.push_back(dest); - debugC(3, kDebugWalk, "buildPath: corner case 0"); + debugC(3, kDebugWalk, "buildPath: corner case 0 (%i nodes)", s._walkPath.size()); return; } ZonePtr z1 = _vm->hitZone(kZonePath, foot.x, foot.y); if (!z1 || z1 == z0) { s._walkPath.push_back(dest); - debugC(3, kDebugWalk, "buildPath: corner case 1"); + debugC(3, kDebugWalk, "buildPath: corner case 1 (%i nodes)", s._walkPath.size()); return; } @@ -480,7 +480,7 @@ void PathWalker_BR::buildPath(State &s, uint16 x, uint16 y) { if (z1->u._pathLists[id].empty()) { s._walkPath.clear(); - debugC(3, kDebugWalk, "buildPath: no path"); + debugC(3, kDebugWalk, "buildPath: no path found"); return; } @@ -490,7 +490,7 @@ void PathWalker_BR::buildPath(State &s, uint16 x, uint16 y) { s._walkPath.push_front(*b); } s._walkPath.push_back(dest); - debugC(3, kDebugWalk, "buildPath: complex path"); + debugC(3, kDebugWalk, "buildPath: complex path (%i nodes)", s._walkPath.size()); } @@ -541,8 +541,6 @@ void PathWalker_BR::walk() { return; } - debugC(3, kDebugWalk, "PathWalker_BR::walk()"); - doWalk(_character); doWalk(_follower); @@ -566,8 +564,6 @@ void PathWalker_BR::walk() { } _vm->_gfx->initiateScroll(dx, dy); - - debugC(3, kDebugWalk, "PathWalker_BR::walk() -> done"); } void PathWalker_BR::checkTrap(const Common::Point &p) { @@ -601,8 +597,6 @@ void PathWalker_BR::doWalk(State &s) { return; } - debugC(3, kDebugWalk, "PathWalker_BR::doWalk(%s)", s._a->_name); - if (s._walkDelay > 0) { s._walkDelay--; if (s._walkDelay == 0 && s._a->_scriptName) { @@ -619,10 +613,10 @@ void PathWalker_BR::doWalk(State &s) { if (s._walkPath.empty()) { finalizeWalk(s); - debugC(3, kDebugWalk, "PathWalker_BR::doWalk, case 0"); + debugC(3, kDebugWalk, "PathWalker_BR::doWalk, walk completed (no more nodes)"); return; } else { - debugC(3, kDebugWalk, "PathWalker_BR::doWalk, moving to next node"); + debugC(3, kDebugWalk, "PathWalker_BR::doWalk, reached a walkpath node, %i left", s._walkPath.size()); } } @@ -714,7 +708,7 @@ void PathWalker_BR::doWalk(State &s) { Common::Point p2; s._a->getFoot(p2); checkTrap(p2); - debugC(3, kDebugWalk, "PathWalker_BR::doWalk, case 1"); + debugC(3, kDebugWalk, "PathWalker_BR::doWalk, stepped to (%i, %i)", p2.x, p2.y); return; } |