aboutsummaryrefslogtreecommitdiff
path: root/engines/director/score.cpp
diff options
context:
space:
mode:
authorDmitry Iskrich2016-06-18 19:12:33 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit952c2ceabdfe52105147d4625a820f97c64819f1 (patch)
tree82b598c5830ada63284a37a30385d0df465f5568 /engines/director/score.cpp
parent632a07500fb16fbaa3c82f0ba95e803efee471de (diff)
downloadscummvm-rg350-952c2ceabdfe52105147d4625a820f97c64819f1.tar.gz
scummvm-rg350-952c2ceabdfe52105147d4625a820f97c64819f1.tar.bz2
scummvm-rg350-952c2ceabdfe52105147d4625a820f97c64819f1.zip
DIRECTOR: Add some enums for cast structures
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r--engines/director/score.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 7b56e55f61..14965d4a7e 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -506,23 +506,30 @@ BitmapCast::BitmapCast(Common::SeekableReadStream &stream) {
TextCast::TextCast(Common::SeekableReadStream &stream) {
/*byte flags =*/ stream.readByte();
- borderSize = stream.readByte();
- gutterSize = stream.readByte();
- boxShadow = stream.readByte();
- textType = stream.readByte();
- textAlign = stream.readUint16BE();
+ borderSize = static_cast<SizeType>(stream.readByte());
+ gutterSize = static_cast<SizeType>(stream.readByte());
+ boxShadow = static_cast<SizeType>(stream.readByte());
+ textType = static_cast<TextType>(stream.readByte());
+ textAlign = static_cast<TextAlignType>(stream.readUint16BE());
stream.skip(6); //palinfo
/*uint32 unk1 = */ stream.readUint32BE();
initialRect = Score::readRect(stream);
- textShadow = stream.readByte();
- textFlags = stream.readByte();
+ textShadow = static_cast<SizeType>(stream.readByte());
+ byte flags = stream.readByte();
+ if (flags & 0x1)
+ textFlags.push_back(kTextFlagEditable);
+ if (flags & 0x2)
+ textFlags.push_back(kTextFlagAutoTab);
+ if (flags & 0x4)
+ textFlags.push_back(kTextFlagDoNotWrap);
+
/*uint16 unk2 =*/ stream.readUint16BE();
}
ShapeCast::ShapeCast(Common::SeekableReadStream &stream) {
/*byte flags = */ stream.readByte();
/*unk1 = */ stream.readByte();
- shapeType = stream.readByte();
+ shapeType = static_cast<ShapeType>(stream.readByte());
initialRect = Score::readRect(stream);
pattern = stream.readUint16BE();
fgCol = stream.readByte();