diff options
author | richiesams | 2013-08-18 15:41:52 -0500 |
---|---|---|
committer | richiesams | 2013-08-18 19:53:04 -0500 |
commit | 6ee93ad5c2b2ea577a587af172a28b100a9956d8 (patch) | |
tree | 84e4d03f2628032493fc019cce1a2c87e7fa4a7f /engines/zvision | |
parent | 46ab3557660221b2896c0d5cd4a7d3fb0464d1d1 (diff) | |
download | scummvm-rg350-6ee93ad5c2b2ea577a587af172a28b100a9956d8.tar.gz scummvm-rg350-6ee93ad5c2b2ea577a587af172a28b100a9956d8.tar.bz2 scummvm-rg350-6ee93ad5c2b2ea577a587af172a28b100a9956d8.zip |
ZVISION: Convert _puzzlesToCheck to a Queue instead of a Stack
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/script_manager.cpp | 4 | ||||
-rw-r--r-- | engines/zvision/script_manager.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index 9796a95353..8a1b60a0dc 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -257,12 +257,12 @@ void ScriptManager::changeLocationIntern() { // Change the background position _engine->getRenderManager()->setBackgroundPosition(_nextLocation.offset); - // Add all the local puzzles to the stack to be checked // Enable all the controls for (Common::HashMap<uint32, Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) { (*iter)._value->enable(_engine); } + // Add all the local puzzles to the queue to be checked for (Common::List<Puzzle>::iterator iter = _activePuzzles.begin(); iter != _activePuzzles.end(); iter++) { // Reset any Puzzles that have the flag ONCE_PER_INST if ((*iter).flags & Puzzle::ONCE_PER_INST == Puzzle::ONCE_PER_INST) { @@ -272,7 +272,7 @@ void ScriptManager::changeLocationIntern() { _puzzlesToCheck.push(&(*iter)); } - // Add all the global puzzles to the stack to be checked + // Add all the global puzzles to the queue to be checked for (Common::List<Puzzle>::iterator iter = _globalPuzzles.begin(); iter != _globalPuzzles.end(); iter++) { // Reset any Puzzles that have the flag ONCE_PER_INST if ((*iter).flags & Puzzle::ONCE_PER_INST == Puzzle::ONCE_PER_INST) { diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h index d484531470..362c4efed9 100644 --- a/engines/zvision/script_manager.h +++ b/engines/zvision/script_manager.h @@ -24,7 +24,7 @@ #define ZVISION_SCRIPT_MANAGER_H #include "common/hashmap.h" -#include "common/stack.h" +#include "common/queue.h" #include "zvision/puzzle.h" #include "zvision/control.h" @@ -64,7 +64,7 @@ private: /** References _globalState keys to Puzzles */ Common::HashMap<uint32, Common::Array<Puzzle *> > _referenceTable; /** Holds the Puzzles that should be checked this frame */ - Common::Stack<Puzzle *> _puzzlesToCheck; + Common::Queue<Puzzle *> _puzzlesToCheck; /** Holds the currently active puzzles */ Common::List<Puzzle> _activePuzzles; /** Holds the global puzzles */ |