[Scummvm-cvs-logs] SF.net SVN: scummvm: [33022] scummvm/trunk/engines/parallaction/exec_ns.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Jul 13 05:39:43 CEST 2008
Revision: 33022
http://scummvm.svn.sourceforge.net/scummvm/?rev=33022&view=rev
Author: peres001
Date: 2008-07-12 20:39:42 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
Cleanup and improved debugging output for CommandExec::run()
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/exec_ns.cpp
Modified: scummvm/trunk/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_ns.cpp 2008-07-13 03:30:14 UTC (rev 33021)
+++ scummvm/trunk/engines/parallaction/exec_ns.cpp 2008-07-13 03:39:42 UTC (rev 33022)
@@ -418,29 +418,39 @@
void CommandExec::run(CommandList& list, ZonePtr z) {
- if (list.size() == 0)
+ if (list.size() == 0) {
+ debugC(3, kDebugExec, "runCommands: nothing to do");
return;
+ }
- debugC(3, kDebugExec, "runCommands");
+ debugC(3, kDebugExec, "runCommands starting");
+ uint32 useFlags = 0;
+ bool useLocalFlags;
+
CommandList::iterator it = list.begin();
for ( ; it != list.end(); it++) {
+ if (_engineFlags & kEngineQuit)
+ break;
CommandPtr cmd = *it;
- uint32 v8 = _vm->getLocationFlags();
- if (_engineFlags & kEngineQuit)
- break;
-
if (cmd->_flagsOn & kFlagsGlobal) {
- v8 = _commandFlags | kFlagsGlobal;
+ useFlags = _commandFlags | kFlagsGlobal;
+ useLocalFlags = false;
+ } else {
+ useFlags = _vm->getLocationFlags();
+ useLocalFlags = true;
}
- debugC(3, kDebugExec, "runCommands[%i] (on: %x, off: %x)", cmd->_id, cmd->_flagsOn, cmd->_flagsOff);
+ bool onMatch = (cmd->_flagsOn & useFlags) == cmd->_flagsOn;
+ bool offMatch = (cmd->_flagsOff & ~useFlags) == cmd->_flagsOff;
- if ((cmd->_flagsOn & v8) != cmd->_flagsOn) continue;
- if ((cmd->_flagsOff & ~v8) != cmd->_flagsOff) continue;
+ debugC(3, kDebugExec, "runCommands[%i] (on: %x, off: %x), (%s = %x)", cmd->_id, cmd->_flagsOn, cmd->_flagsOff,
+ useLocalFlags ? "LOCALFLAGS" : "GLOBALFLAGS", useFlags);
+ if (!onMatch || !offMatch) continue;
+
_ctxt.z = z;
_ctxt.cmd = cmd;
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