diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-bytecode.cpp | 7 | ||||
-rw-r--r-- | engines/director/score.cpp | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp index 2fc0655e72..64fc354cb5 100644 --- a/engines/director/lingo/lingo-bytecode.cpp +++ b/engines/director/lingo/lingo-bytecode.cpp @@ -126,7 +126,12 @@ void Lingo::addCodeV4(Common::SeekableSubReadStreamEndian &stream, ScriptType ty stream.seek(constsOffset); for (uint16 i = 0; i < constsCount; i++) { Datum constant; - uint16 constType = stream.readUint16(); + uint32 constType = 0; + if (_vm->getVersion() >= 5) { + constType = stream.readUint32(); + } else { + constType = (uint32)stream.readUint16(); + } uint32 value = stream.readUint32(); switch (constType) { case 1: // String type diff --git a/engines/director/score.cpp b/engines/director/score.cpp index cc33d470b4..e593f87c44 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -181,7 +181,7 @@ void Score::loadArchive() { loadSpriteImages(false); // Try to load script name lists - if (_vm->getVersion() == 4) { + if (_vm->getVersion() >= 4) { Common::Array<uint16> lnam = _movieArchive->getResourceIDList(MKTAG('L','n','a','m')); if (lnam.size() > 0) { debugC(2, kDebugLoading, "****** Loading %d Lnam resources", lnam.size()); @@ -193,7 +193,7 @@ void Score::loadArchive() { } // Try to load compiled Lingo scripts - if (_vm->getVersion() == 4) { + if (_vm->getVersion() >= 4) { Common::Array<uint16> lscr = _movieArchive->getResourceIDList(MKTAG('L','s','c','r')); if (lscr.size() > 0) { debugC(2, kDebugLoading, "****** Loading %d Lscr resources", lscr.size()); @@ -897,7 +897,7 @@ bool Score::processImmediateFrameScript(Common::String s, int id) { } void Score::loadLingoNames(Common::SeekableSubReadStreamEndian &stream) { - if (_vm->getVersion() == 4) { + if (_vm->getVersion() >= 4) { _lingo->addNamesV4(stream); } else { error("Score::loadLingoNames: unsuported Director version (%d)", _vm->getVersion()); @@ -905,7 +905,7 @@ void Score::loadLingoNames(Common::SeekableSubReadStreamEndian &stream) { } void Score::loadLingoScript(Common::SeekableSubReadStreamEndian &stream) { - if (_vm->getVersion() == 4) { + if (_vm->getVersion() >= 4) { _lingo->addCodeV4(stream, kMovieScript, _movieScriptCount); } else { error("Score::loadLingoScript: unsuported Director version (%d)", _vm->getVersion()); |