mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
PARALLACTION: parse command lists for kNoneType zones, even if defined after TYPE markers. This fixes bug #3131769.
svn-id: r54879
This commit is contained in:
parent
6e5b3ca588
commit
c4e4f7dc86
@ -179,6 +179,7 @@ public:
|
||||
virtual void parseMergeData(ZonePtr z);
|
||||
virtual void parseHearData(ZonePtr z);
|
||||
virtual void parseSpeakData(ZonePtr z);
|
||||
virtual void parseNoneData(ZonePtr z);
|
||||
protected:
|
||||
Common::String parseComment();
|
||||
Common::String parseDialogueString();
|
||||
|
@ -1412,6 +1412,24 @@ void LocationParser_ns::parseSpeakData(ZonePtr z) {
|
||||
}
|
||||
}
|
||||
|
||||
void LocationParser_ns::parseNoneData(ZonePtr z) {
|
||||
// "None" zones should have no content, but some
|
||||
// inconsistently define their command list after
|
||||
// the TYPE marker. This routine catches these
|
||||
// command lists that would be lost otherwise.
|
||||
if (!scumm_stricmp(_tokens[0], "commands")) {
|
||||
parseCommands(z->_commands);
|
||||
ctxt.endcommands = false;
|
||||
do {
|
||||
_script->readLineToken(true);
|
||||
_parser->parseStatement();
|
||||
} while (!ctxt.endcommands);
|
||||
|
||||
// no need to parse one more line here, as
|
||||
// it is done by the caller
|
||||
}
|
||||
}
|
||||
|
||||
typedef void (LocationParser_ns::*ZoneTypeParser)(ZonePtr);
|
||||
static ZoneTypeParser parsers[] = {
|
||||
0, // no type
|
||||
@ -1423,7 +1441,7 @@ static ZoneTypeParser parsers[] = {
|
||||
&LocationParser_ns::parseHearData,
|
||||
0, // feel
|
||||
&LocationParser_ns::parseSpeakData,
|
||||
0, // none
|
||||
&LocationParser_ns::parseNoneData,
|
||||
0, // trap
|
||||
0, // you
|
||||
0 // command
|
||||
|
Loading…
x
Reference in New Issue
Block a user