aboutsummaryrefslogtreecommitdiff
path: root/engines/director/cast.cpp
diff options
context:
space:
mode:
authorScott Percival2018-11-24 23:55:26 +0800
committerEugene Sandulenko2019-11-17 22:31:54 +0100
commit3096a91c1215714a79c05b42f28118148a0ec8eb (patch)
tree9d79e4bf9168373a456b7f511c8198bb81a450e5 /engines/director/cast.cpp
parent2aa2b196c21427adab16d3d8ca9367ee97bc812e (diff)
downloadscummvm-rg350-3096a91c1215714a79c05b42f28118148a0ec8eb.tar.gz
scummvm-rg350-3096a91c1215714a79c05b42f28118148a0ec8eb.tar.bz2
scummvm-rg350-3096a91c1215714a79c05b42f28118148a0ec8eb.zip
DIRECTOR: extract image pitch from BitmapCast
Diffstat (limited to 'engines/director/cast.cpp')
-rw-r--r--engines/director/cast.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 564460b640..fe0f72d856 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -29,6 +29,7 @@ namespace Director {
BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint32 castTag, uint16 version) {
if (version < 4) {
+ pitch = 0;
flags = stream.readByte();
someFlaggyThing = stream.readUint16();
initialRect = Score::readRect(stream);
@@ -42,8 +43,8 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint32 castTag, uint16
unk2 = stream.readUint16();
}
} else if (version == 4) {
- stream.readByte();
- stream.readByte();
+ pitch = stream.readUint16();
+ pitch &= 0x0fff;
flags = 0;
someFlaggyThing = 0;
@@ -67,6 +68,7 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint32 castTag, uint16
warning("BitmapCast: %d bytes left", tail);
} else if (version == 5) {
+ pitch = 0;
uint16 count = stream.readUint16();
for (uint16 cc = 0; cc < count; cc++)
stream.readUint32();