aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-31 17:00:36 +0000
committerNicola Mettifogo2009-03-31 17:00:36 +0000
commit0a2ff7f18fd710ed7f65a58f71d13ac5008034cc (patch)
tree9c13b9100cc2bc2a96f136dcf2b0f5b676c31b59 /engines/parallaction
parent86a1926c19bf32f4a0b315c6f7d7d1f3567e555d (diff)
downloadscummvm-rg350-0a2ff7f18fd710ed7f65a58f71d13ac5008034cc.tar.gz
scummvm-rg350-0a2ff7f18fd710ed7f65a58f71d13ac5008034cc.tar.bz2
scummvm-rg350-0a2ff7f18fd710ed7f65a58f71d13ac5008034cc.zip
Fixed dialogue balloon appearing in the wrong position after commit 39772.
svn-id: r39774
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/dialogue.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 451e54f449..6596a09bda 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -105,6 +105,8 @@ public:
DialogueManager(Parallaction *vm, ZonePtr z);
virtual ~DialogueManager();
+ void start();
+
bool isOver() {
return _state == DIALOGUE_OVER;
}
@@ -176,14 +178,18 @@ DialogueManager::DialogueManager(Parallaction *vm, ZonePtr z) : _vm(vm), _z(z) {
_answerer = _vm->_char._talk;
_askPassword = false;
- _q = _dialogue->_questions[0];
_cmdList = 0;
_answerId = 0;
+}
+void DialogueManager::start() {
+ assert(_dialogue);
+ _q = _dialogue->_questions[0];
_state = displayQuestion() ? RUN_QUESTION : NEXT_ANSWER;
}
+
DialogueManager::~DialogueManager() {
if (isNpc) {
delete _questioner;
@@ -428,6 +434,8 @@ void DialogueManager::run() {
void Parallaction::enterDialogueMode(ZonePtr z) {
debugC(1, kDebugDialogue, "Parallaction::enterDialogueMode(%s)", z->u._filename.c_str());
_dialogueMan = _vm->createDialogueManager(z);
+ assert(_dialogueMan);
+ _dialogueMan->start();
_input->_inputMode = Input::kInputModeDialogue;
}