aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorOri Avtalion2016-07-02 12:19:32 +0300
committerOri Avtalion2016-07-02 12:22:50 +0300
commitcfeae98eb0538502774b031153ec0b72b8d260bf (patch)
tree4a8061359c0a93395159048e13c79ab667c50710 /engines/scumm
parent948e4487389f6ae99d4a61e0cf6d995d16e62c82 (diff)
downloadscummvm-rg350-cfeae98eb0538502774b031153ec0b72b8d260bf.tar.gz
scummvm-rg350-cfeae98eb0538502774b031153ec0b72b8d260bf.tar.bz2
scummvm-rg350-cfeae98eb0538502774b031153ec0b72b8d260bf.zip
SCUMM: Add actor/object names to debug output
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/debugger.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 0ebea94608..617c2ab85f 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -411,14 +411,15 @@ bool ScummDebugger::Cmd_PrintActor(int argc, const char **argv) {
int i;
Actor *a;
- debugPrintf("+---------------------------------------------------------------+\n");
- debugPrintf("|# | x | y | w | h |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
- debugPrintf("+--+----+----+---+---+----+---+---+---+---+---+---+---+---------+\n");
+ debugPrintf("+----------------------------------------------------------------------------+\n");
+ debugPrintf("|# | name | x | y | w | h |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
+ debugPrintf("+--+------------+----+----+---+---+----+---+---+---+---+---+---+---+---------+\n");
for (i = 1; i < _vm->_numActors; i++) {
a = _vm->_actors[i];
+ const byte *name = _vm->getObjOrActorName(_vm->actorToObj(a->_number));
if (a->_visible)
- debugPrintf("|%2d|%4d|%4d|%3d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
- a->_number, a->getRealPos().x, a->getRealPos().y, a->_width, a->_bottom - a->_top,
+ debugPrintf("|%2d|%-12.12s|%4d|%4d|%3d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
+ a->_number, name, a->getRealPos().x, a->getRealPos().y, a->_width, a->_bottom - a->_top,
a->getElevation(),
a->_costume, a->_walkbox, a->_moving, a->_forceClip, a->_frame,
a->_scalex, a->getFacing(), _vm->_classData[a->_number]);
@@ -431,17 +432,18 @@ bool ScummDebugger::Cmd_PrintObjects(int argc, const char **argv) {
int i;
ObjectData *o;
debugPrintf("Objects in current room\n");
- debugPrintf("+---------------------------------+------------+\n");
- debugPrintf("|num | x | y |width|height|state|fl| cls |\n");
- debugPrintf("+----+----+----+-----+------+-----+--+---------+\n");
+ debugPrintf("+-----------------------------------------------------------+\n");
+ debugPrintf("|num | name | x | y |width|height|state|fl| cls |\n");
+ debugPrintf("+----+------------+----+----+-----+------+-----+--+---------+\n");
for (i = 1; i < _vm->_numLocalObjects; i++) {
o = &(_vm->_objs[i]);
if (o->obj_nr == 0)
continue;
int classData = (_vm->_game.version != 0 ? _vm->_classData[o->obj_nr] : 0);
- debugPrintf("|%4d|%4d|%4d|%5d|%6d|%5d|%2d|$%08x|\n",
- o->obj_nr, o->x_pos, o->y_pos, o->width, o->height, o->state,
+ const byte *name = _vm->getObjOrActorName(o->obj_nr);
+ debugPrintf("|%4d|%-12.12s|%4d|%4d|%5d|%6d|%5d|%2d|$%08x|\n",
+ o->obj_nr, name, o->x_pos, o->y_pos, o->width, o->height, o->state,
o->fl_object_index, classData);
}
debugPrintf("\n");