diff options
Diffstat (limited to 'engines/parallaction/dialogue.cpp')
-rw-r--r-- | engines/parallaction/dialogue.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index eb2254cd80..a771f960a9 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -51,8 +51,8 @@ class DialogueManager { bool _askPassword; bool isNpc; - Frames *_questioner; - Frames *_answerer; + GfxObj *_questioner; + GfxObj *_answerer; Question *_q; @@ -93,7 +93,7 @@ uint16 DialogueManager::askPassword() { uint16 passwordLen = 0; _password[0] = '\0'; - _vm->_gfx->setDialogueBalloon(_q->_answers[0]->_text, 1, 3); + _vm->_balloonMan->setDialogueBalloon(_q->_answers[0]->_text, 1, 3); int id = _vm->_gfx->setItem(_answerer, ANSWER_CHARACTER_X, ANSWER_CHARACTER_Y); _vm->_gfx->setItemFrame(id, 0); @@ -113,7 +113,7 @@ uint16 DialogueManager::askPassword() { } if (changed) { - _vm->_gfx->setBalloonText(0, _q->_answers[0]->_text, 3); + _vm->_balloonMan->setBalloonText(0, _q->_answers[0]->_text, 3); _vm->_gfx->updateScreen(); changed = false; } @@ -138,7 +138,7 @@ uint16 DialogueManager::askPassword() { } - _vm->_gfx->hideDialogueStuff(); + _vm->hideDialogueStuff(); return 0; @@ -157,7 +157,7 @@ bool DialogueManager::displayAnswer(uint16 i) { // display suitable answers if (((a->_yesFlags & flags) == a->_yesFlags) && ((a->_noFlags & ~flags) == a->_noFlags)) { - int id = _vm->_gfx->setDialogueBalloon(a->_text, 1, 3); + int id = _vm->_balloonMan->setDialogueBalloon(a->_text, 1, 3); assert(id >= 0); _visAnswers[id] = i; @@ -185,13 +185,13 @@ void DialogueManager::displayQuestion() { if (!scumm_stricmp(_q->_text, "NULL")) return; - _vm->_gfx->setSingleBalloon(_q->_text, QUESTION_BALLOON_X, QUESTION_BALLOON_Y, _q->_mood & 0x10, 0); + _vm->_balloonMan->setSingleBalloon(_q->_text, QUESTION_BALLOON_X, QUESTION_BALLOON_Y, _q->_mood & 0x10, 0); int id = _vm->_gfx->setItem(_questioner, QUESTION_CHARACTER_X, QUESTION_CHARACTER_Y); _vm->_gfx->setItemFrame(id, _q->_mood & 0xF); _vm->_gfx->updateScreen(); _vm->_input->waitUntilLeftClick(); - _vm->_gfx->hideDialogueStuff(); + _vm->hideDialogueStuff(); return; } @@ -224,7 +224,7 @@ void DialogueManager::run() { answer = 0; displayQuestion(); - + if (_vm->quit()) return; @@ -244,7 +244,7 @@ void DialogueManager::run() { } if (cmdlist) - _vm->runCommands(*cmdlist); + _vm->_cmdExec->run(*cmdlist); } @@ -256,31 +256,31 @@ int16 DialogueManager::selectAnswer() { _vm->_gfx->setItemFrame(id, _q->_answers[0]->_mood & 0xF); if (numAvailableAnswers == 1) { - _vm->_gfx->setBalloonText(0, _q->_answers[0]->_text, 0); + _vm->_balloonMan->setBalloonText(0, _q->_answers[0]->_text, 0); _vm->_input->waitUntilLeftClick(); - _vm->_gfx->hideDialogueStuff(); + _vm->hideDialogueStuff(); return 0; } int oldSelection = -1; - int selection; + int selection = 0; uint32 event; Common::Point p; while (!_vm->quit()) { - + _vm->_input->readInput(); _vm->_input->getCursorPos(p); event = _vm->_input->getLastButtonEvent(); - selection = _vm->_gfx->hitTestDialogueBalloon(p.x, p.y); + selection = _vm->_balloonMan->hitTestDialogueBalloon(p.x, p.y); if (selection != oldSelection) { if (oldSelection != -1) { - _vm->_gfx->setBalloonText(oldSelection, _q->_answers[_visAnswers[oldSelection]]->_text, 3); + _vm->_balloonMan->setBalloonText(oldSelection, _q->_answers[_visAnswers[oldSelection]]->_text, 3); } if (selection != -1) { - _vm->_gfx->setBalloonText(selection, _q->_answers[_visAnswers[selection]]->_text, 0); + _vm->_balloonMan->setBalloonText(selection, _q->_answers[_visAnswers[selection]]->_text, 0); _vm->_gfx->setItemFrame(0, _q->_answers[_visAnswers[selection]]->_mood & 0xF); } } @@ -295,7 +295,7 @@ int16 DialogueManager::selectAnswer() { oldSelection = selection; } - _vm->_gfx->hideDialogueStuff(); + _vm->hideDialogueStuff(); return _visAnswers[selection]; } |