diff options
author | Nicola Mettifogo | 2008-02-05 09:25:25 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-02-05 09:25:25 +0000 |
commit | e1cff6a7c35dc523675a26de007e22cac403a8e1 (patch) | |
tree | ea21c30c24c9febadef0468c9f96c497e4c21881 /engines | |
parent | f8fe01b9fdc8852db9d6b038b813ec3f275f98ed (diff) | |
download | scummvm-rg350-e1cff6a7c35dc523675a26de007e22cac403a8e1.tar.gz scummvm-rg350-e1cff6a7c35dc523675a26de007e22cac403a8e1.tar.bz2 scummvm-rg350-e1cff6a7c35dc523675a26de007e22cac403a8e1.zip |
Added new debug command to show global game flags.
svn-id: r30794
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/debug.cpp | 17 | ||||
-rw-r--r-- | engines/parallaction/debug.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp index bd16266cba..9f1c868318 100644 --- a/engines/parallaction/debug.cpp +++ b/engines/parallaction/debug.cpp @@ -41,6 +41,7 @@ Debugger::Debugger(Parallaction *vm) DCmd_Register("give", WRAP_METHOD(Debugger, Cmd_Give)); DCmd_Register("zones", WRAP_METHOD(Debugger, Cmd_Zones)); DCmd_Register("animations", WRAP_METHOD(Debugger, Cmd_Animations)); + DCmd_Register("globalflags",WRAP_METHOD(Debugger, Cmd_GlobalFlags)); DCmd_Register("localflags", WRAP_METHOD(Debugger, Cmd_LocalFlags)); DCmd_Register("locations", WRAP_METHOD(Debugger, Cmd_Locations)); DCmd_Register("gfxobjects", WRAP_METHOD(Debugger, Cmd_GfxObjects)); @@ -96,6 +97,22 @@ bool Debugger::Cmd_Locations(int argc, const char **argv) { return true; } +bool Debugger::Cmd_GlobalFlags(int argc, const char **argv) { + + uint32 flags = _commandFlags; + + DebugPrintf("+------------------------------+---------+\n" + "| flag name | value |\n" + "+------------------------------+---------+\n"); + for (uint i = 0; i < _vm->_globalTable->count(); i++) { + const char *value = ((flags & (1 << i)) == 0) ? "OFF" : "ON"; + DebugPrintf("|%-30s| %-6s|\n", _vm->_globalTable->item(i), value); + } + DebugPrintf("+------------------------------+---------+\n"); + + return true; +} + bool Debugger::Cmd_LocalFlags(int argc, const char **argv) { uint32 flags = _vm->_localFlags[_vm->_currentLocationIndex]; diff --git a/engines/parallaction/debug.h b/engines/parallaction/debug.h index 66b610a466..c8d0cd1d1c 100644 --- a/engines/parallaction/debug.h +++ b/engines/parallaction/debug.h @@ -25,6 +25,7 @@ protected: bool Cmd_Zones(int argc, const char **argv); bool Cmd_Animations(int argc, const char **argv); bool Cmd_LocalFlags(int argc, const char **argv); + bool Cmd_GlobalFlags(int argc, const char **argv); bool Cmd_Locations(int argc, const char **argv); bool Cmd_GfxObjects(int argc, const char **argv); }; |