[Scummvm-git-logs] scummvm master -> 4f846db925fb7877846c4e5382819ed24d8d0822
moralrecordings
code at moral.net.au
Sun Jan 26 04:18:29 UTC 2020
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:
8e738e4b12 DIRECTOR: LINGO: Allow on-demand creation of globals
4f846db925 DIRECTOR: LINGO: Fix sign bit offset in float conversion
Commit: 8e738e4b12d82bfa3809a7b3ed63f5c57e15a7a0
https://github.com/scummvm/scummvm/commit/8e738e4b12d82bfa3809a7b3ed63f5c57e15a7a0
Author: Scott Percival (code at moral.net.au)
Date: 2020-01-26T12:18:00+08:00
Commit Message:
DIRECTOR: LINGO: Allow on-demand creation of globals
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 de08468..97eeaed 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -327,10 +327,12 @@ void LC::cb_globalassign() {
Symbol *s = g_lingo->lookupVar(name.c_str(), false);
if (!s) {
- warning("Variable %s not found", name.c_str());
- g_lingo->pop();
- return;
- } else if (s && !s->global) {
+ // Lingo lets you declare globals inside a method.
+ // This doesn't define them in the script list, but you can still
+ // read and write to them???
+ s = g_lingo->lookupVar(name.c_str(), true, true);
+ }
+ if (s && !s->global) {
warning("Variable %s is local, not global", name.c_str());
}
Commit: 4f846db925fb7877846c4e5382819ed24d8d0822
https://github.com/scummvm/scummvm/commit/4f846db925fb7877846c4e5382819ed24d8d0822
Author: Scott Percival (code at moral.net.au)
Date: 2020-01-26T12:18:00+08:00
Commit Message:
DIRECTOR: LINGO: Fix sign bit offset in float conversion
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 97eeaed..3b4ae1e 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -710,7 +710,7 @@ void Lingo::addCodeV4(Common::SeekableSubReadStreamEndian &stream, ScriptType ty
break;
}
uint16 exponent = READ_BE_UINT16(&constsStore[pointer]);
- uint64 f64sign = exponent & 0x8000 ? 0x80000000 : 0;
+ uint64 f64sign = (uint64)(exponent & 0x8000) << 48;
exponent &= 0x7fff;
uint64 fraction = READ_BE_UINT64(&constsStore[pointer+2]);
fraction &= 0x7fffffffffffffff;
More information about the Scummvm-git-logs
mailing list