[Scummvm-git-logs] scummvm master -> 608380c09baa2dbc3f08027fb8f67caadb73ded6
rvanlaar
noreply at scummvm.org
Fri Sep 6 20:01:56 UTC 2024
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:
608380c09b DIRECTOR: implement D5 findVar for field
Commit: 608380c09baa2dbc3f08027fb8f67caadb73ded6
https://github.com/scummvm/scummvm/commit/608380c09baa2dbc3f08027fb8f67caadb73ded6
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-09-06T21:52:30+02:00
Commit Message:
DIRECTOR: implement D5 findVar for field
In D5 castmembers are referenced by a castLibId and a castMemberId.
This was changed from D4 where it's only referenced by castMemberId.
Under the hood, D5 adds an extra `0` in the bytecode when the castLib
isn't specified. That `0` was used as the castMemberId.
The result: `WARNING: varAssign: Unknown member 0 of castLib 1!`
When querying by field or member in D5 use both the castMemberId
and the castLibId.
Lingo code that works now: `put "hello" into member "output"`
Fixes D5-win dictionary c/castlibn.dir.
Changed paths:
engines/director/lingo/lingo-bytecode.cpp
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 47a8521374d..39dfbad0b57 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -377,7 +377,12 @@ Datum Lingo::findVarV4(int varType, const Datum &id) {
}
break;
case 6: // field
- res = id.asMemberID();
+ if (g_director->getVersion() < 500) {
+ res = id.asMemberID();
+ } else {
+ Datum castName = g_lingo->pop();
+ res = castName.asMemberID(kCastTypeAny, id.asInt());
+ }
res.type = FIELDREF;
break;
default:
More information about the Scummvm-git-logs
mailing list