From 466479eb77dfd04c7116f97f93e2f8013442307b Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 13 Jun 2010 09:07:15 +0000 Subject: Added a parser for kZoneNone zones/animations in BRA. The only thing it does is parsing a possible command list, which is enough to support the script bug in "scende2". See ticket #3005384. svn-id: r49628 --- engines/parallaction/parser.h | 1 + engines/parallaction/parser_br.cpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 3e46e99180..5eb26e9fa1 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -294,6 +294,7 @@ public: virtual void parseGetData(ZonePtr z); virtual void parseDoorData(ZonePtr z); virtual void parseHearData(ZonePtr z); + virtual void parseNoneData(ZonePtr z); protected: void parseAnswerCounter(Answer *answer); virtual Answer *parseAnswer(); diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index d3ce1235c1..57259fd637 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -825,6 +825,16 @@ void LocationParser_br::parseHearData(ZonePtr z) { } } +void LocationParser_br::parseNoneData(ZonePtr z) { + /* the only case we have to handle here is that of "scende2", which is the only Animation with + a command list following the type marker. + */ + if (!scumm_stricmp(_tokens[0], "commands")) { + parseCommands(z->_commands); + } +} + + typedef void (LocationParser_br::*ZoneTypeParser)(ZonePtr); static ZoneTypeParser parsers[] = { 0, // no type @@ -836,7 +846,7 @@ static ZoneTypeParser parsers[] = { &LocationParser_br::parseHearData, 0, // feel &LocationParser_br::parseSpeakData, - 0, // none + &LocationParser_br::parseNoneData, 0, // trap 0, // you 0, // command @@ -882,7 +892,6 @@ DECLARE_ANIM_PARSER(moveto) { // ctxt.a->_moveTo.z = atoi(_tokens[3]); } - DECLARE_ANIM_PARSER(endanimation) { debugC(7, kDebugParser, "ANIM_PARSER(endanimation) "); -- cgit v1.2.3