Exemplo n.º 1
0
bool Lvk::Clue::ScriptParser::parseBody(QDomElement &body, Clue::Script &script)
{
    bool parsingOk = true;

    for (int i = 0; i < body.childNodes().size() && parsingOk; ++i) {
        QDomElement e = body.childNodes().item(i).toElement();
        parsingOk = requireTagName("question", e) && parseQuestion(e, script);

    }

    return parsingOk;
}
Exemplo n.º 2
0
Dialogue *LocationParser_ns::parseDialogue() {
	debugC(7, kDebugParser, "parseDialogue()");

	Dialogue *dialogue = new Dialogue;
	assert(dialogue);

	_script->readLineToken(true);

	while (scumm_stricmp(_tokens[0], "enddialogue")) {
		if (!scumm_stricmp(_tokens[0], "question")) {
			Question *q = new Question(_tokens[1]);
			assert(q);
			parseQuestion(q);
			dialogue->addQuestion(q);
		}
		_script->readLineToken(true);
	}

	debugC(7, kDebugParser, "parseDialogue() done");

	return dialogue;
}