diff options
author | Nicola Mettifogo | 2009-03-29 12:41:00 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2009-03-29 12:41:00 +0000 |
commit | 011b73a09ba1e3d51a403ed65cedcd9394d6bfb0 (patch) | |
tree | 08918f98b49d00fa5714582be4623a85ba52869d /engines/parallaction/exec.cpp | |
parent | d883cb209eab63268338b3f86843ce32c1027fdb (diff) | |
download | scummvm-rg350-011b73a09ba1e3d51a403ed65cedcd9394d6bfb0.tar.gz scummvm-rg350-011b73a09ba1e3d51a403ed65cedcd9394d6bfb0.tar.bz2 scummvm-rg350-011b73a09ba1e3d51a403ed65cedcd9394d6bfb0.zip |
Commands now evaluate their reference Zone at runtime, thus handling of forward references in the parser is no more needed.
svn-id: r39738
Diffstat (limited to 'engines/parallaction/exec.cpp')
-rw-r--r-- | engines/parallaction/exec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/parallaction/exec.cpp b/engines/parallaction/exec.cpp index 0d5215cd9a..24579286e6 100644 --- a/engines/parallaction/exec.cpp +++ b/engines/parallaction/exec.cpp @@ -102,6 +102,16 @@ void CommandExec::runList(CommandList::iterator first, CommandList::iterator las CommandPtr cmd = *first; + if (cmd->_valid && !cmd->_zone && !cmd->_zoneName.empty()) { + // try binding the command to a zone + cmd->_zone = _vm->_location.findZone(cmd->_zoneName.c_str()); + cmd->_valid = cmd->_zone != 0; + } + + if (!cmd->_valid) { + continue; + } + if (cmd->_flagsOn & kFlagsGlobal) { useFlags = _globalFlags | kFlagsGlobal; useLocalFlags = false; |