aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.l
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-11 10:38:14 +0100
committerEugene Sandulenko2017-01-11 10:38:14 +0100
commit23e0bc5d8d9535a68dc414f198e7f5d4dbbdfe63 (patch)
treeb28518256a5f8772cadc648cc6b8bdb71c96c266 /engines/director/lingo/lingo-lex.l
parent8fa8b4578f92a2288bd6d36da7cefb67e9e4b171 (diff)
downloadscummvm-rg350-23e0bc5d8d9535a68dc414f198e7f5d4dbbdfe63.tar.gz
scummvm-rg350-23e0bc5d8d9535a68dc414f198e7f5d4dbbdfe63.tar.bz2
scummvm-rg350-23e0bc5d8d9535a68dc414f198e7f5d4dbbdfe63.zip
DIRECTOR: Lingo: Improvements to me() handling in factories
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r--engines/director/lingo/lingo-lex.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index afd90aeb6d..9d9dba7d39 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -246,6 +246,12 @@ whitespace [\t ]
if (g_lingo->_twoWordBuiltins.contains(yytext))
return TWOWORDBUILTIN;
+ // Special treatment of 'me'. First parameter is method name
+ if (!g_lingo->_currentFactory.empty()) {
+ if (yylval.s->equalsIgnoreCase("me"))
+ return tME;
+ }
+
if (g_lingo->_handlers.contains(yytext)) {
if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->parens == false) {
if (g_lingo->_handlers[yytext]->nargs == 0) {