[Scummvm-git-logs] scummvm master -> 4307acdcc89a425581ccb255788319d585c5a074

sev- sev at scummvm.org
Mon Mar 6 20:35:26 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4307acdcc8 DIRECTOR: Lingo: Split 'on ...' statement when preprocessing


Commit: 4307acdcc89a425581ccb255788319d585c5a074
    https://github.com/scummvm/scummvm/commit/4307acdcc89a425581ccb255788319d585c5a074
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-06T20:34:04+01:00

Commit Message:
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.

Changed paths:
    engines/director/lingo/lingo.cpp


diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 5775eb1..706f767 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;





More information about the Scummvm-git-logs mailing list