diff options
author | Eugene Sandulenko | 2016-07-12 20:58:05 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 8b20d3d67bcec592999376ca0cb3d3dede4d6789 (patch) | |
tree | 8cc356681cbc4d8d8b5524f681b832330c22b672 /engines/director/lingo/lingo-lex.cpp | |
parent | c6406042afc834ff3ecc10a2dddbbb199090869c (diff) | |
download | scummvm-rg350-8b20d3d67bcec592999376ca0cb3d3dede4d6789.tar.gz scummvm-rg350-8b20d3d67bcec592999376ca0cb3d3dede4d6789.tar.bz2 scummvm-rg350-8b20d3d67bcec592999376ca0cb3d3dede4d6789.zip |
DIRECTOR: Lingo: Distinguish same name the fields for different the entities
Diffstat (limited to 'engines/director/lingo/lingo-lex.cpp')
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index fabac3f287..b40ca07fcb 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -1088,10 +1088,6 @@ YY_RULE_SETUP while (*ptr != ' ' && *ptr != '\t') field += *ptr++; - if (!g_lingo->_theEntityFields.contains(field)) { - error("Unhandled the field %s", ptr); - } - while (*ptr == ' ' || *ptr == '\t') ptr++; @@ -1101,6 +1097,12 @@ YY_RULE_SETUP ptr++; if (g_lingo->_theEntities.contains(ptr)) { + field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str()); + + if (!g_lingo->_theEntityFields.contains(field)) { + error("Unhandled the field %s", ptr); + } + if (g_lingo->_theEntityFields[field]->entity != g_lingo->_theEntities[ptr]->entity) error("Unsupported field '%s' for entity '%s'", field.c_str(), ptr); @@ -1118,7 +1120,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 131 "engines/director/lingo/lingo-lex.l" +#line 133 "engines/director/lingo/lingo-lex.l" { count(); @@ -1134,8 +1136,6 @@ YY_RULE_SETUP return THEENTITYWITHID; else return THEENTITY; - } else if (g_lingo->_theEntityFields.contains(ptr)) { - error("the field without entity: %s", ptr); } error("Unhandled the entity %s", ptr); |