aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorrichiesams2013-08-05 19:09:28 -0500
committerrichiesams2013-08-05 19:19:24 -0500
commita31a97c520bbe49bf351b5178302a529f313a35e (patch)
tree0ad267b291873fdc160e548ce6b0cdb2daed074c /engines/zvision
parent30afe1a81532f19c7ab872ff20e2b04c582ff221 (diff)
downloadscummvm-rg350-a31a97c520bbe49bf351b5178302a529f313a35e.tar.gz
scummvm-rg350-a31a97c520bbe49bf351b5178302a529f313a35e.tar.bz2
scummvm-rg350-a31a97c520bbe49bf351b5178302a529f313a35e.zip
ZVISION: Add debug statements for Puzzle checking
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/script_manager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index 7fcade22c1..395d45cff9 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -24,6 +24,7 @@
#include "common/algorithm.h"
#include "common/hashmap.h"
+#include "common/debug.h"
#include "zvision/script_manager.h"
#include "zvision/actions.h"
@@ -76,6 +77,8 @@ void ScriptManager::checkPuzzleCriteria() {
while (!_puzzlesToCheck.empty()) {
Puzzle *puzzle = _puzzlesToCheck.pop();
+ debug("Checking puzzle: %u", puzzle->key);
+
// Check each Criteria
bool criteriaMet = false;
for (Common::List<Puzzle::Criteria>::iterator iter = puzzle->criteriaList.begin(); iter != puzzle->criteriaList.end(); iter++) {
@@ -110,6 +113,8 @@ void ScriptManager::checkPuzzleCriteria() {
// TODO: Add logic for the different Flags (aka, ONCE_PER_INST)
// criteriaList can be empty. Aka, the puzzle should be executed immediately
if (puzzle->criteriaList.empty() || criteriaMet) {
+ debug("Puzzle %u criteria passed. Executing its ResultActions", puzzle->key);
+
for (Common::List<Common::SharedPtr<ResultAction> >::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) {
(*resultIter)->execute(_engine);
}