From 6d4d253ec44408006b37f5e08d9c284618175ff9 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 29 Jan 2011 07:20:42 +0000 Subject: PARALLACTION: Improve dialogue debug output. Print out the current question or the available answers when debug level is 9. svn-id: r55602 --- engines/parallaction/dialogue.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index dea7a9b8bb..1865171053 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -24,6 +24,7 @@ */ #include "common/events.h" +#include "common/debug-channels.h" #include "parallaction/exec.h" #include "parallaction/input.h" #include "parallaction/parallaction.h" @@ -161,6 +162,19 @@ void DialogueManager::transitionToState(DialogueState newState) { if (_state != newState) { debugC(3, kDebugDialogue, "DialogueManager moved to state '%s'", dialogueStates[newState]); + + if (DebugMan.isDebugChannelEnabled(kDebugDialogue) && gDebugLevel == 9) { + switch (newState) { + case RUN_QUESTION: + debug(" Q : %s", _q->_text.c_str()); + break; + case RUN_ANSWER: + for (int i = 0; i < _numVisAnswers; ++i) { + debug(" A%02i: %s", i, _visAnswers[i]._a->_text.c_str()); + } + break; + } + } } _state = newState; -- cgit v1.2.3