[Scummvm-git-logs] scummvm master -> 55c58e1151892f293b14465096c4557a65b9effa

sev- sev at scummvm.org
Thu Jun 11 21:46:45 UTC 2020


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:
3fdea5ceee DIRECTOR: LINGO: Enhanced preprocessor for 'return'
1e22c02f49 DIRECTOR: LINGO: Added test for additional 'return' preprocessing
55c58e1151 DIRECTOR: LINGO: Object references existed at least in D2 too


Commit: 3fdea5ceeee1978059e6c42fa83ff61c50c1ee43
    https://github.com/scummvm/scummvm/commit/3fdea5ceeee1978059e6c42fa83ff61c50c1ee43
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-11T23:46:31+02:00

Commit Message:
DIRECTOR: LINGO: Enhanced preprocessor for 'return'

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


diff --git a/engines/director/lingo/lingo-preprocessor.cpp b/engines/director/lingo/lingo-preprocessor.cpp
index 149a83ecc9..ec1ceab8e1 100644
--- a/engines/director/lingo/lingo-preprocessor.cpp
+++ b/engines/director/lingo/lingo-preprocessor.cpp
@@ -490,7 +490,8 @@ Common::String preprocessReturn(Common::String in) {
 		debugC(2, kDebugParse | kDebugPreprocess, "RETURN: prevtok: %s nexttok: %s", prev.c_str(), next.c_str());
 
 		if (prev.hasSuffix("&") || prev.hasSuffix("&&") || prev.hasSuffix("=") ||
-				next.hasPrefix("&") || next.hasPrefix("&&")) {
+				next.hasPrefix("&") || next.hasPrefix("&&") || prev.hasSuffix(",") ||
+				next.hasPrefix(")")) {
 			res += "scummvm_"; // Turn it into scummvm_return
 		}
 


Commit: 1e22c02f49b7fca6f211b74b28683ca86af96254
    https://github.com/scummvm/scummvm/commit/1e22c02f49b7fca6f211b74b28683ca86af96254
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-11T23:46:31+02:00

Commit Message:
DIRECTOR: LINGO: Added test for additional 'return' preprocessing

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


diff --git a/engines/director/lingo/tests/strings.lingo b/engines/director/lingo/tests/strings.lingo
index f45fafe4b1..487750ddb6 100644
--- a/engines/director/lingo/tests/strings.lingo
+++ b/engines/director/lingo/tests/strings.lingo
@@ -24,3 +24,4 @@ if the key = Return then
 end if
 
 when keydown then if the key=return then set the stagecolor to random (256)
+file(mWritestring, return)


Commit: 55c58e1151892f293b14465096c4557a65b9effa
    https://github.com/scummvm/scummvm/commit/55c58e1151892f293b14465096c4557a65b9effa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-11T23:46:31+02:00

Commit Message:
DIRECTOR: LINGO: Object references existed at least in D2 too

Changed paths:
    engines/director/lingo/lingo-lex.cpp
    engines/director/lingo/lingo-lex.l


diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 0167fdda9f..62f329ce14 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -427,7 +427,7 @@ static const YY_CHAR yy_ec[256] =
 
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    2,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1
@@ -1441,7 +1441,7 @@ YY_RULE_SETUP
 			else
 				return THEENTITY;
 		} else {
-			if (g_director->getVersion() >= 4) {
+			if (g_director->getVersion() >= 3) {
 				Common::String key = Common::String::format("%d%s", g_lingo->_objectEntityId, field.c_str());
 
 				if (!g_lingo->_theEntityFields.contains(key)) { // Okay, this must be an object reference
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 4238f4f32c..e1c81eecd9 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -291,7 +291,7 @@ the{spc}+[[:alpha:]]+{spc}+of{spc}+{identifier}	{
 			else
 				return THEENTITY;
 		} else {
-			if (g_director->getVersion() >= 4) {
+			if (g_director->getVersion() >= 3) {
 				Common::String key = Common::String::format("%d%s", g_lingo->_objectEntityId, field.c_str());
 
 				if (!g_lingo->_theEntityFields.contains(key)) { // Okay, this must be an object reference




More information about the Scummvm-git-logs mailing list