From 6ee93ad5c2b2ea577a587af172a28b100a9956d8 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 18 Aug 2013 15:41:52 -0500 Subject: ZVISION: Convert _puzzlesToCheck to a Queue instead of a Stack --- engines/zvision/script_manager.cpp | 4 ++-- 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::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::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::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 > _referenceTable; /** Holds the Puzzles that should be checked this frame */ - Common::Stack _puzzlesToCheck; + Common::Queue _puzzlesToCheck; /** Holds the currently active puzzles */ Common::List _activePuzzles; /** Holds the global puzzles */ -- cgit v1.2.3