[Scummvm-git-logs] scummvm master -> ec80f20416b2ec785f60a01237c6fb63c8bbe122

sev- sev at scummvm.org
Wed Nov 27 18:05:37 UTC 2019


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

Summary:
d86831d690 DIRECTOR: LINGO: Improved parsing debug output
0e3c1c7a12 DIRECTOR: LINGO: Explain why tests are skipped
ec80f20416 DIRECTOR: LINGO: Made if.lingo test executable


Commit: d86831d690c99c174cf2b6ed0554403763c18a28
    https://github.com/scummvm/scummvm/commit/d86831d690c99c174cf2b6ed0554403763c18a28
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-11-27T18:44:21+01:00

Commit Message:
DIRECTOR: LINGO: Improved parsing debug output

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


diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 161fd27..4b29074 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -93,22 +93,22 @@ const char *Lingo::findNextDefinition(const char *s) {
 			return NULL;
 
 		if (!strncmp(res, "macro ", 6)) {
-			debugC(1, kDebugLingoCompile, "See macro");
+			debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'macros ' construct");
 			return res;
 		}
 
 		if (!strncmp(res, "on ", 3)) {
-			debugC(1, kDebugLingoCompile, "See on");
+			debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'on ' construct");
 			return res;
 		}
 
 		if (!strncmp(res, "factory ", 8)) {
-			debugC(1, kDebugLingoCompile, "See factory");
+			debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'factory ' construct");
 			return res;
 		}
 
 		if (!strncmp(res, "method ", 7)) {
-			debugC(1, kDebugLingoCompile, "See method");
+			debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'method ' construct");
 			return res;
 		}
 
@@ -120,7 +120,8 @@ const char *Lingo::findNextDefinition(const char *s) {
 }
 
 void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
-	debugC(1, kDebugLingoCompile, "Add code \"%s\" for type %s with id %d", code, scriptType2str(type), id);
+	debugC(1, kDebugLingoCompile, "Add code for type %s with id %d\n"
+			"***********\n%s\n\n***********", scriptType2str(type), id, code);
 
 	if (_scriptContexts[type].contains(id)) {
 		for (size_t j = 0; j < _scriptContexts[type][id]->functions.size(); j++) {
@@ -193,7 +194,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
 
 		_hadError = true; // HACK: This is for preventing test execution
 
-		debugC(1, kDebugLingoCompile, "Code chunk:\n#####\n%s#####", begin);
+		debugC(1, kDebugLingoCompile, "Code chunk:\n#####\n%s\n#####", begin);
 		parse(begin);
 	} else {
 		parse(code);


Commit: 0e3c1c7a1294a332f3eab6ae4bdfd8ef95fe7af5
    https://github.com/scummvm/scummvm/commit/0e3c1c7a1294a332f3eab6ae4bdfd8ef95fe7af5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-11-27T19:04:54+01:00

Commit Message:
DIRECTOR: LINGO: Explain why tests are skipped

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


diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 4b29074..365b67c 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -192,7 +192,10 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
 			begin = end;
 		}
 
-		_hadError = true; // HACK: This is for preventing test execution
+		// Do not execute event handlers, macros and factories
+		// A side effect of it is that if you had those in your test script,
+		// then the whole script will not be executed
+		_hadError = true;
 
 		debugC(1, kDebugLingoCompile, "Code chunk:\n#####\n%s\n#####", begin);
 		parse(begin);


Commit: ec80f20416b2ec785f60a01237c6fb63c8bbe122
    https://github.com/scummvm/scummvm/commit/ec80f20416b2ec785f60a01237c6fb63c8bbe122
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-11-27T19:05:12+01:00

Commit Message:
DIRECTOR: LINGO: Made if.lingo test executable

Changed paths:
    engines/director/lingo/tests/if.lingo


diff --git a/engines/director/lingo/tests/if.lingo b/engines/director/lingo/tests/if.lingo
index cbf70f6..512a154 100644
--- a/engines/director/lingo/tests/if.lingo
+++ b/engines/director/lingo/tests/if.lingo
@@ -26,8 +26,6 @@ repeat with x = 1 to 6
 	else put 50
 end repeat
 
-
-macro checkKey
     if the keyCode = 36 then                    --  return key goes to first menu
         go to frame 1
     else if the keyCode = 123 then           --  left arrow goes to previous menu




More information about the Scummvm-git-logs mailing list