diff options
author | Nicola Mettifogo | 2007-05-13 12:38:29 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-05-13 12:38:29 +0000 |
commit | e9d038a423ddcd803bd0b63fe163c749426c4acd (patch) | |
tree | 047badab26f6271c333439270fd6a9b220ba46d3 /engines | |
parent | b1a95b502d573ca89ad4097a2a744793dbafc33c (diff) | |
download | scummvm-rg350-e9d038a423ddcd803bd0b63fe163c749426c4acd.tar.gz scummvm-rg350-e9d038a423ddcd803bd0b63fe163c749426c4acd.tar.bz2 scummvm-rg350-e9d038a423ddcd803bd0b63fe163c749426c4acd.zip |
Added new debugger commands.
svn-id: r26829
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/debug.cpp | 103 | ||||
-rw-r--r-- | engines/parallaction/debug.h | 4 |
2 files changed, 85 insertions, 22 deletions
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp index 497554e5ed..58909d07fa 100644 --- a/engines/parallaction/debug.cpp +++ b/engines/parallaction/debug.cpp @@ -32,28 +32,28 @@ namespace Parallaction { const char *_jobDescriptions[] = { - "0 - draw label", - "1 - draw mouse", - "2 - delay remove Job (erase label) || show inventory", - "3 - draw animations", - "4 - NONE", - "5 - NONE", - "6 - NONE", - "7 - NONE", - "8 - NONE", - "9 - NONE", - "10 - NONE", - "11 - NONE", - "12 - NONE", - "13 - NONE", - "14 - NONE", - "15 - delay remove Job (erase label) || run scripts || erase animations", - "16 - NONE", - "17 - job_12d4 (put item on screen) || jobRemovePickedItem (remove item from screen)", - "18 - toggle door", - "19 - walk", - "20 - erase label || hide inventory", - "21 - erase mouse" + "draw label", + "draw mouse", + "delayed label deletion || show inventory", + "draw animations", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "NONE", + "delayed label deletion || run scripts || erase animations", + "NONE", + "put item || pickup item", + "toggle door", + "walk", + "erase label || hide inventory", + "erase mouse" }; Debugger::Debugger(Parallaction *vm) @@ -63,6 +63,11 @@ Debugger::Debugger(Parallaction *vm) DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); DCmd_Register("location", WRAP_METHOD(Debugger, Cmd_Location)); DCmd_Register("give", WRAP_METHOD(Debugger, Cmd_Give)); + DCmd_Register("jobs", WRAP_METHOD(Debugger, Cmd_Jobs)); + DCmd_Register("zones", WRAP_METHOD(Debugger, Cmd_Zones)); + DCmd_Register("animations", WRAP_METHOD(Debugger, Cmd_Animations)); + + } @@ -118,4 +123,58 @@ bool Debugger::Cmd_Give(int argc, const char **argv) { return true; } + +bool Debugger::Cmd_Jobs(int argc, const char **argv) { + + JobList::iterator b = _vm->_jobs.begin(); + JobList::iterator e = _vm->_jobs.end(); + + DebugPrintf("+---+-------------------------------------------------------------+\n" + "|tag| description |\n" + "+---+-------------------------------------------------------------+\n"); + for ( ; b != e; b++) { + DebugPrintf("|%3i| %-60s|\n", (*b)->_tag, _jobDescriptions[(*b)->_tag] ); + } + DebugPrintf("+---+-------------------------------------------------------------+\n"); + + + return true; +} + +bool Debugger::Cmd_Zones(int argc, const char **argv) { + + ZoneList::iterator b = _vm->_zones.begin(); + ZoneList::iterator e = _vm->_zones.end(); + + DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n" + "| name | l | t | r | b | type | flag |\n" + "+--------------------+---+---+---+---+--------+--------+\n"); + for ( ; b != e; b++) { + Zone *z = *b; + DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_label._text, z->_left, z->_top, z->_right, z->_bottom, z->_type, z->_flags ); + } + DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n"); + + + return true; +} + +bool Debugger::Cmd_Animations(int argc, const char **argv) { + + AnimationList::iterator b = _vm->_animations.begin(); + AnimationList::iterator e = _vm->_animations.end(); + + DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n" + "| name | x | y | z | f | type | flag | \n" + "+--------------------+---+---+---+---+--------+--------+\n"); + for ( ; b != e; b++) { + Animation *a = *b; + DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", a->_label._text, a->_left, a->_top, a->_z, a->_frame, a->_type, a->_flags ); + } + DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n"); + + + return true; +} + } // namespace Parallaction diff --git a/engines/parallaction/debug.h b/engines/parallaction/debug.h index 371ed70b1e..17b3fbb14f 100644 --- a/engines/parallaction/debug.h +++ b/engines/parallaction/debug.h @@ -22,6 +22,10 @@ protected: bool Cmd_DebugLevel(int argc, const char **argv); bool Cmd_Location(int argc, const char **argv); bool Cmd_Give(int argc, const char **argv); + bool Cmd_Jobs(int argc, const char **argv); + bool Cmd_Zones(int argc, const char **argv); + bool Cmd_Animations(int argc, const char **argv); + }; } // End of namespace Parallaction |