diff options
author | Eugene Sandulenko | 2017-03-06 20:34:04 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-03-06 20:34:04 +0100 |
commit | 4307acdcc89a425581ccb255788319d585c5a074 (patch) | |
tree | 8208b2e524a6c76f3e5753999ededae7709f8f41 /engines | |
parent | 28eb61657e832682fcff055da3b66689d790946b (diff) | |
download | scummvm-rg350-4307acdcc89a425581ccb255788319d585c5a074.tar.gz scummvm-rg350-4307acdcc89a425581ccb255788319d585c5a074.tar.bz2 scummvm-rg350-4307acdcc89a425581ccb255788319d585c5a074.zip |
DIRECTOR: Lingo: Split 'on ...' statement when preprocessing
D4 scripts do not have respective 'end...' statement, which leads
to syntax errors. Now we are preprocessing those as well.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 5775eb13bc..706f76777d 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -140,6 +140,11 @@ const char *Lingo::findNextDefinition(const char *s) { return res; } + if (!strncmp(res, "on ", 3)) { + debugC(1, kDebugLingoCompile, "See on"); + return res; + } + if (!strncmp(res, "factory ", 8)) { debugC(1, kDebugLingoCompile, "See factory"); return res; @@ -195,7 +200,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) { if (chunk.hasPrefix("factory") || chunk.hasPrefix("method")) _inFactory = true; - else if (chunk.hasPrefix("macro")) + else if (chunk.hasPrefix("macro") || chunk.hasPrefix("on")) _inFactory = false; else _inFactory = false; |