aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.l
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-11 19:16:48 +0100
committerEugene Sandulenko2017-01-11 19:27:19 +0100
commit74f008e14e52086e5081633abe3844ec8bb872a1 (patch)
treec37dd3b2090a6dc55d264295572c753876cc0e31 /engines/director/lingo/lingo-lex.l
parent8eb8f9b0ef79b47fc8e149d5b86034bf99e2c9ce (diff)
downloadscummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.tar.gz
scummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.tar.bz2
scummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.zip
DIRECTOR: Lingo: Proper processing of me() 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) {