[Scummvm-git-logs] scummvm master -> ddd826c81bf3f984ca66fc7dbfdc060ccce70b13
djsrv
dservilla at gmail.com
Tue Aug 10 21:41:13 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
871687a241 DIRECTOR: LINGO: Properly set _refMode in COMPILE macros
ddd826c81b DIRECTOR: LINGO: Fix compiling chunk expression refs
Commit: 871687a241469b799e4cbeb7fd756f9ec5e04721
https://github.com/scummvm/scummvm/commit/871687a241469b799e4cbeb7fd756f9ec5e04721
Author: djsrv (dservilla at gmail.com)
Date: 2021-08-10T17:37:20-04:00
Commit Message:
DIRECTOR: LINGO: Properly set _refMode in COMPILE macros
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 38c6db9e0c..983f6a0fa1 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -57,20 +57,37 @@
namespace Director {
#define COMPILE(node) \
- if (!(node)->accept(this)) \
- return false; \
+ { \
+ bool refModeStore = _refMode; \
+ _refMode = false; \
+ bool success = (node)->accept(this); \
+ _refMode = refModeStore; \
+ if (!success) \
+ return false; \
+ }
#define COMPILE_REF(node) \
- _refMode = true; \
- if (!(node)->accept(this)) { \
- _refMode = false; \
- return false; \
- } \
- _refMode = false;
+ { \
+ bool refModeStore = _refMode; \
+ _refMode = true; \
+ bool success = (node)->accept(this); \
+ _refMode = refModeStore; \
+ if (!success) \
+ return false; \
+ }
#define COMPILE_LIST(list) \
- for (uint i = 0; i < (list)->size(); i++) { \
- if (!(*(list))[i]->accept(this)) \
+ { \
+ bool refModeStore = _refMode; \
+ _refMode = false; \
+ bool success = true; \
+ for (uint i = 0; i < (list)->size(); i++) { \
+ success = (*(list))[i]->accept(this); \
+ if (!success) \
+ break; \
+ } \
+ _refMode = refModeStore; \
+ if (!success) \
return false; \
}
Commit: ddd826c81bf3f984ca66fc7dbfdc060ccce70b13
https://github.com/scummvm/scummvm/commit/ddd826c81bf3f984ca66fc7dbfdc060ccce70b13
Author: djsrv (dservilla at gmail.com)
Date: 2021-08-10T17:39:14-04:00
Commit Message:
DIRECTOR: LINGO: Fix compiling chunk expression refs
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 983f6a0fa1..6146e25b91 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -1402,7 +1402,11 @@ bool LingoCompiler::visitTheLastNode(TheLastNode *node) {
codeInt(-30000);
code1(LC::c_intpush);
codeInt(0);
- COMPILE(node->arg);
+ if (_refMode) {
+ COMPILE_REF(node->arg);
+ } else {
+ COMPILE(node->arg);
+ }
switch (node->type) {
case kChunkChar:
if (_refMode) {
@@ -1481,7 +1485,11 @@ bool LingoCompiler::visitChunkExprNode(ChunkExprNode *node) {
code1(LC::c_intpush);
codeInt(0);
}
- COMPILE(node->src);
+ if (_refMode) {
+ COMPILE_REF(node->src);
+ } else {
+ COMPILE(node->src);
+ }
switch (node->type) {
case kChunkChar:
if (_refMode) {
More information about the Scummvm-git-logs
mailing list