[Scummvm-cvs-logs] SF.net SVN: scummvm:[49141] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat May 22 17:56:27 CEST 2010
Revision: 49141
http://scummvm.svn.sourceforge.net/scummvm/?rev=49141&view=rev
Author: peres001
Date: 2010-05-22 15:56:27 +0000 (Sat, 22 May 2010)
Log Message:
-----------
Apply patch 3005433 by fuzzie: new 'toggleglobalflags' command for the debugger.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/debug.cpp
scummvm/trunk/engines/parallaction/debug.h
Modified: scummvm/trunk/engines/parallaction/debug.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/debug.cpp 2010-05-22 15:56:09 UTC (rev 49140)
+++ scummvm/trunk/engines/parallaction/debug.cpp 2010-05-22 15:56:27 UTC (rev 49141)
@@ -42,6 +42,7 @@
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 @@
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();
Modified: scummvm/trunk/engines/parallaction/debug.h
===================================================================
--- scummvm/trunk/engines/parallaction/debug.h 2010-05-22 15:56:09 UTC (rev 49140)
+++ scummvm/trunk/engines/parallaction/debug.h 2010-05-22 15:56:27 UTC (rev 49141)
@@ -28,6 +28,7 @@
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_ToggleGlobalFlag(int argc, const char **argv);
bool Cmd_Locations(int argc, const char **argv);
bool Cmd_GfxObjects(int argc, const char **argv);
bool Cmd_Programs(int argc, const char** argv);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list