[Scummvm-cvs-logs] SF.net SVN: scummvm: [26251] scummvm/trunk/engines/parallaction/dialogue. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Mar 19 23:38:00 CET 2007
Revision: 26251
http://scummvm.svn.sourceforge.net/scummvm/?rev=26251&view=rev
Author: peres001
Date: 2007-03-19 15:38:00 -0700 (Mon, 19 Mar 2007)
Log Message:
-----------
final version of runDialogue
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/dialogue.cpp
Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp 2007-03-19 22:32:35 UTC (rev 26250)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp 2007-03-19 22:38:00 UTC (rev 26251)
@@ -375,22 +375,17 @@
_vm->_gfx->setFont("comic");
- Cnv* v6E;
+ bool isNpc = scumm_stricmp(data->_name, "yourself") && data->_name[0] != '\0';
+ Cnv *face = isNpc ? _vm->_disk->loadTalk(data->_name) : _vm->_char._talk;
- if (scumm_stricmp(data->_name, "yourself") && data->_name[0] != '\0') {
- v6E = _vm->_disk->loadTalk(data->_name);
- } else {
- v6E = _vm->_char._talk;
- }
-
_askPassword = false;
uint16 answer = 0;
- Command *v34 = NULL;
+ Command *cmdlist = NULL;
Dialogue *q = data->_dialogue;
while (q) {
- displayQuestion(q, v6E);
+ displayQuestion(q, face);
if (q->_answers[0] == NULL) break;
_answerBalloonY[0] = 10;
@@ -398,9 +393,8 @@
if (scumm_stricmp(q->_answers[0], "NULL")) {
if (!displayAnswers(q)) break;
-
answer = getDialogueAnswer(q, _vm->_char._talk);
- v34 = q->_commands[answer];
+ cmdlist = q->_commands[answer];
}
q = (Dialogue*)q->_following._questions[answer];
@@ -410,13 +404,13 @@
_vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront);
- if (scumm_stricmp(data->_name, "yourself") && data->_name[0] != '\0') {
- _vm->_gfx->freeCnv(v6E);
- delete v6E;
+ if (isNpc) {
+ _vm->_gfx->freeCnv(face);
+ delete face;
}
exitDialogue();
- runCommands(v34);
+ runCommands(cmdlist);
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list