diff options
author | Marisa-Chan | 2013-10-25 14:52:40 +0700 |
---|---|---|
committer | Marisa-Chan | 2013-10-25 14:52:40 +0700 |
commit | 91cbb1ec790a604309c766ef38f6a2704922365b (patch) | |
tree | 4da861ad3bb9598646ea8444e8555feb58e946b7 | |
parent | c87ca1bc9c9023b2f85b5151e790f6ebe60ea2c2 (diff) | |
download | scummvm-rg350-91cbb1ec790a604309c766ef38f6a2704922365b.tar.gz scummvm-rg350-91cbb1ec790a604309c766ef38f6a2704922365b.tar.bz2 scummvm-rg350-91cbb1ec790a604309c766ef38f6a2704922365b.zip |
ZVISION: Move setState to use queuePuzzle.
-rw-r--r-- | engines/zvision/script_manager.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index 515fd7a450..7531182e95 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -245,13 +245,12 @@ void ScriptManager::queuePuzzles(uint32 key) { } void ScriptManager::setStateValue(uint32 key, uint value) { - _globalState[key] = value; - - if (_referenceTable.contains(key)) { - for (Common::Array<Puzzle *>::iterator iter = _referenceTable[key].begin(); iter != _referenceTable[key].end(); ++iter) { - _puzzlesToCheck.push((*iter)); - } - } + if (value == 0) + _globalState.erase(key); + else + _globalState[key] = value; + debug("setStateValue %d %d\n", key , value); + queuePuzzles(key); } void ScriptManager::addToStateValue(uint32 key, uint valueToAdd) { |