diff options
author | Tony Puccinelli | 2010-08-11 01:11:16 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-11 01:11:16 +0000 |
commit | 3a7a0ba720f219c4780cf19d196cda9c0456a20b (patch) | |
tree | fe7f45242447dc7d14447babbdea9fbbb771c506 /engines/parallaction/debug.cpp | |
parent | 6543062e5701e8011a4b12abffa8afca56f30b3f (diff) | |
parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
download | scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.tar.gz scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.tar.bz2 scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.zip |
manually merged engines from trunk into branch
svn-id: r51964
Diffstat (limited to 'engines/parallaction/debug.cpp')
-rw-r--r-- | engines/parallaction/debug.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp index 8864c84e2f..b5eb82b456 100644 --- a/engines/parallaction/debug.cpp +++ b/engines/parallaction/debug.cpp @@ -42,6 +42,7 @@ Debugger::Debugger(Parallaction *vm) 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("toggleglobalflag",WRAP_METHOD(Debugger, Cmd_ToggleGlobalFlag)); DCmd_Register("localflags", WRAP_METHOD(Debugger, Cmd_LocalFlags)); DCmd_Register("locations", WRAP_METHOD(Debugger, Cmd_Locations)); DCmd_Register("gfxobjects", WRAP_METHOD(Debugger, Cmd_GfxObjects)); @@ -117,6 +118,32 @@ bool Debugger::Cmd_GlobalFlags(int argc, const char **argv) { return true; } +bool Debugger::Cmd_ToggleGlobalFlag(int argc, const char **argv) { + + int i; + + switch (argc) { + case 2: + i = _vm->_globalFlagsNames->lookup(argv[1]); + if (i == Table::notFound) { + DebugPrintf("invalid flag '%s'\n", argv[1]); + } else { + i--; + if ((_globalFlags & (1 << i)) == 0) + _globalFlags |= (1 << i); + else + _globalFlags &= ~(1 << i); + } + break; + + default: + DebugPrintf("toggleglobalflag <flag name>\n"); + + } + + return true; +} + bool Debugger::Cmd_LocalFlags(int argc, const char **argv) { uint32 flags = _vm->getLocationFlags(); |