diff options
author | James Brown | 2002-03-08 08:27:45 +0000 |
---|---|---|
committer | James Brown | 2002-03-08 08:27:45 +0000 |
commit | 41d1864add8dd9fe227963b812c59edb83a74138 (patch) | |
tree | 0e462592252f447547d79c79e999a24222168e15 /debug.cpp | |
parent | ad800009b22b3c6603f0fe189f262284abd85d63 (diff) | |
download | scummvm-rg350-41d1864add8dd9fe227963b812c59edb83a74138.tar.gz scummvm-rg350-41d1864add8dd9fe227963b812c59edb83a74138.tar.bz2 scummvm-rg350-41d1864add8dd9fe227963b812c59edb83a74138.zip |
Zak/Indy box matrix fix. Still doesn't quite work :/
svn-id: r3684
Diffstat (limited to 'debug.cpp')
-rw-r--r-- | debug.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
@@ -108,15 +108,28 @@ bool ScummDebugger::do_command() { return true; case CMD_DUMPBOX: { - int num, i; BoxCoords box; - num = _s->getNumBoxes(); - for (i=0; i<num; i++) { - printf("bt %d\n", i); + int num, i = 0, rows = 0; + BoxCoords box; + byte *boxm = _s->getBoxMatrixBaseAddr(); + num = _s->getNumBoxes(); + + printf("Walk matrix:\n"); + while (*boxm != 0xFF) { + printf("%d ", *boxm); + i++; *boxm++; + if (i >= num) {i = 0; rows++; printf("\n");} + } + + if (rows < num) + printf("\nERROR: Box Matrix invalid, missing or incomplete: %d row(s)", num - rows); + + printf("\nWalk boxes:\n"); + 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); + 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; |