[Scummvm-cvs-logs] scummvm master -> cfeae98eb0538502774b031153ec0b72b8d260bf
salty-horse
ori at avtalion.name
Sat Jul 2 11:23:07 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cfeae98eb0 SCUMM: Add actor/object names to debug output
Commit: cfeae98eb0538502774b031153ec0b72b8d260bf
https://github.com/scummvm/scummvm/commit/cfeae98eb0538502774b031153ec0b72b8d260bf
Author: Ori Avtalion (ori at avtalion.name)
Date: 2016-07-02T12:22:50+03:00
Commit Message:
SCUMM: Add actor/object names to debug output
Changed paths:
engines/scumm/debugger.cpp
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 0ebea94..617c2ab 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");
More information about the Scummvm-git-logs
mailing list