aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-16 09:05:33 +0100
committerEugene Sandulenko2017-01-16 09:05:50 +0100
commit72dbfe953ca06ea084976015a186d7f4d12b0e51 (patch)
tree8ee05e3693f259b623b24d54fccb077107875580
parenta5e998b75ab61f2f5f830edf3b8dbaa28eef47ba (diff)
downloadscummvm-rg350-72dbfe953ca06ea084976015a186d7f4d12b0e51.tar.gz
scummvm-rg350-72dbfe953ca06ea084976015a186d7f4d12b0e51.tar.bz2
scummvm-rg350-72dbfe953ca06ea084976015a186d7f4d12b0e51.zip
DIRECTOR: Initialize cast classes
-rw-r--r--engines/director/cast.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 0db59cbd64..4522eaeeb6 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -44,13 +44,17 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint16 version) {
stream.readByte();
stream.readByte();
+ flags = 0;
+ someFlaggyThing = 0;
+ unk1 = unk2 = 0;
+
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
regX = stream.readUint16();
regY = stream.readUint16();
bitsPerPixel = stream.readUint16();
- if (bitsPerPixel == 0)
+ if (bitsPerPixel == 0)
bitsPerPixel = 1;
int tail = 0;
@@ -66,6 +70,19 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint16 version) {
}
TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
+ borderSize = kSizeNone;
+ gutterSize = kSizeNone;
+ boxShadow = kSizeNone;
+
+ flags1 = 0;
+ fontId = 0;
+ fontSize = 12;
+ textType = kTextTypeFixed;
+ textAlign = kTextAlignLeft;
+ textShadow = kSizeNone;
+ textSlant = 0;
+ palinfo1 = palinfo2 = palinfo3 = 0;
+
if (version < 4) {
flags1 = stream.readByte();
borderSize = static_cast<SizeType>(stream.readByte());
@@ -95,6 +112,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
// TODO: FIXME: guesswork
fontId = stream.readByte();
fontSize = stream.readByte();
+ textSlant = 0;
} else if (version < 5) {
borderSize = static_cast<SizeType>(stream.readByte());
gutterSize = static_cast<SizeType>(stream.readByte());
@@ -117,6 +135,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
warning("Unproxessed text cast flags: %x", flags);
fontSize = stream.readUint16();
+ textSlant = 0;
} else {
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
@@ -143,6 +162,13 @@ ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
initialRect = Score::readRect(stream);
boundingRect = Score::readRect(stream);
+
+ shapeType = kShapeRectangle;
+ pattern = 0;
+ fgCol = bgCol = 0;
+ fillType = 0;
+ lineThickness = 1;
+ lineDirection = 0;
}
modified = 0;
}