From 59f2d1359c55f9f5d7d0c8a7985ff838946e881c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Feb 2017 16:36:41 +0100 Subject: DIRECTOR: Simplified version checks and added more debug output --- engines/director/cast.cpp | 6 +++--- engines/director/score.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp index ed5b05643c..4b391bd8cc 100644 --- a/engines/director/cast.cpp +++ b/engines/director/cast.cpp @@ -83,7 +83,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { textSlant = 0; palinfo1 = palinfo2 = palinfo3 = 0; - if (version < 4) { + if (version <= 3) { flags1 = stream.readByte(); borderSize = static_cast(stream.readByte()); gutterSize = static_cast(stream.readByte()); @@ -115,7 +115,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { fontId = stream.readByte(); fontSize = stream.readByte(); textSlant = 0; - } else if (version < 5) { + } else if (version == 4) { borderSize = static_cast(stream.readByte()); gutterSize = static_cast(stream.readByte()); boxShadow = static_cast(stream.readByte()); @@ -134,7 +134,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { byte flags = stream.readByte(); if (flags) - warning("Unproxessed text cast flags: %x", flags); + warning("Unprocessed text cast flags: %x", flags); fontSize = stream.readUint16(); textSlant = 0; diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 975c6efe33..9987ab59a0 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -302,6 +302,9 @@ void Score::loadCastDataVWCR(Common::SeekableSubReadStreamEndian &stream) { if (size == 0) continue; + if (debugChannelSet(5, kDebugLoading)) + stream.hexdump(size); + uint8 castType = stream.readByte(); switch (castType) { @@ -361,7 +364,7 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id, uint32 size1, size2, size3, castType; byte unk1 = 0, unk2 = 0, unk3 = 0; - if (_vm->getVersion() < 4) { + if (_vm->getVersion() <= 3) { size1 = stream.readUint16(); size2 = stream.readUint32(); size3 = 0; @@ -369,7 +372,7 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id, unk1 = stream.readByte(); unk2 = stream.readByte(); unk3 = stream.readByte(); - } else if (_vm->getVersion() < 5) { + } else if (_vm->getVersion() == 4) { size1 = stream.readUint16() + 2; size2 = stream.readUint32(); size3 = 0; -- cgit v1.2.3