Skip to content

Commit

Permalink
ZVISION: Reverse queue puzzles adding to end->begin
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan committed Nov 15, 2013
1 parent 29fc5be commit 9363a0d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions engines/zvision/script_manager.cpp
Expand Up @@ -266,10 +266,11 @@ int ScriptManager::getStateValue(uint32 key) {

void ScriptManager::queuePuzzles(uint32 key) {
if (_referenceTable.contains(key)) {
for (Common::Array<puzzle_ref>::iterator iter = _referenceTable[key].begin(); iter != _referenceTable[key].end(); ++iter)
if (!iter->puz->addedBySetState) {
iter->scope->scope_queue->push_back(iter->puz);
iter->puz->addedBySetState = true;
Common::Array<puzzle_ref> *arr = &_referenceTable[key];
for (int32 i = arr->size() - 1; i >= 0; i--)
if (!(*arr)[i].puz->addedBySetState) {
(*arr)[i].scope->scope_queue->push_back((*arr)[i].puz);
(*arr)[i].puz->addedBySetState = true;
}
}
}
Expand Down

0 comments on commit 9363a0d

Please sign in to comment.