aboutsummaryrefslogtreecommitdiff
path: root/debug.cpp
diff options
context:
space:
mode:
authorJames Brown2002-02-19 18:04:21 +0000
committerJames Brown2002-02-19 18:04:21 +0000
commitd352341269dc0adab04684249dee8e66bb755081 (patch)
treead8e503c4731548d4f36ddc52b0aa963ad484b00 /debug.cpp
parent5897caa9e51ac341392255dcf293672330f1d6e8 (diff)
downloadscummvm-rg350-d352341269dc0adab04684249dee8e66bb755081.tar.gz
scummvm-rg350-d352341269dc0adab04684249dee8e66bb755081.tar.bz2
scummvm-rg350-d352341269dc0adab04684249dee8e66bb755081.zip
Some temporary changes. New debug command 'b' draws walkboxes on the screen.
For indy3_256/zak256, change the #if 1 in scumm.h - it makes the walkboxes draw correctly, although the actors still don't navigate right. svn-id: r3609
Diffstat (limited to 'debug.cpp')
-rw-r--r--debug.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/debug.cpp b/debug.cpp
index 8e17616c2e..76a11c4548 100644
--- a/debug.cpp
+++ b/debug.cpp
@@ -23,6 +23,8 @@
*/
+
+
#include "stdafx.h"
#include "scumm.h"
@@ -38,6 +40,7 @@ enum {
CMD_ACTOR,
CMD_SCRIPTS,
CMD_LOAD_ROOM,
+ CMD_DUMPBOX,
CMD_EXIT
};
@@ -55,6 +58,7 @@ void ScummDebugger::attach(Scumm *s) {
#endif
}
+void BoxTest(int num);
bool ScummDebugger::do_command() {
int cmd;
@@ -68,6 +72,7 @@ bool ScummDebugger::do_command() {
"(a)ctor [actornum] -> show actor information\n"
"(r)oom roomnum -> load room\n"
"(s)cripts -> show running scripts\n"
+ "(b)oxes -> list and draw boxen\n"
"(e)xit -> exit game\n"
);
return true;
@@ -101,7 +106,19 @@ bool ScummDebugger::do_command() {
_s->_fullRedraw = 1;
}
return true;
-
+ case CMD_DUMPBOX:
+ {
+ int num, i; BoxCoords box;
+ num = _s->getNumBoxes();
+ for (i=0; i<num; i++) {
+ BoxTest(i);
+ _s->getBoxCoordinates(i, &box);
+ printf("%d: [%d x %d] [%d x %d] [%d x %d] [%d x %d]\n", i,
+ box.ul.x, box.ul.y, box.ll.x, box.ll.y,
+ box.ur.x, box.ur.y, box.lr.x, box.lr.y);
+ }
+ }
+ return true;
case CMD_EXIT:
exit(1);
}
@@ -144,6 +161,7 @@ static const DebuggerCommands debugger_commands[] = {
{ "a", 1, CMD_ACTOR },
{ "s", 1, CMD_SCRIPTS },
{ "r", 1, CMD_LOAD_ROOM },
+ { "b", 1, CMD_DUMPBOX},
{ "e", 1, CMD_EXIT },
{ 0, 0, 0 },
};