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.l | |
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.l')
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 4739d20d86..9113ac39ee 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -101,10 +101,6 @@ whitespace [\t ] while (*ptr != ' ' && *ptr != '\t') field += *ptr++; - if (!g_lingo->_theEntityFields.contains(field)) { - error("Unhandled the field %s", ptr); - } - while (*ptr == ' ' || *ptr == '\t') ptr++; @@ -114,6 +110,12 @@ whitespace [\t ] 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); @@ -143,8 +145,6 @@ whitespace [\t ] 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); |