mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
DIRECTOR: Add some enums for cast structures
This commit is contained in:
parent
632a07500f
commit
952c2ceabd
@ -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();
|
||||
|
@ -179,10 +179,17 @@ struct BitmapCast : Cast {
|
||||
uint8 flags;
|
||||
};
|
||||
|
||||
enum ShapeType {
|
||||
kShapeRectangle,
|
||||
kShapeRoundRect,
|
||||
kShapeOval,
|
||||
kShapeLine
|
||||
};
|
||||
|
||||
struct ShapeCast : Cast {
|
||||
ShapeCast(Common::SeekableReadStream &stream);
|
||||
|
||||
byte shapeType;
|
||||
ShapeType shapeType;
|
||||
uint16 pattern;
|
||||
byte fgCol;
|
||||
byte bgCol;
|
||||
@ -191,26 +198,58 @@ struct ShapeCast : Cast {
|
||||
byte lineDirection;
|
||||
};
|
||||
|
||||
enum TextType {
|
||||
kTextTypeAdjustToFit,
|
||||
kTextTypeScrolling,
|
||||
kTextTypeFixed
|
||||
};
|
||||
|
||||
enum TextAlignType {
|
||||
kTextAlignRight = -1,
|
||||
kTextAlignLeft,
|
||||
kTextAlignCenter
|
||||
};
|
||||
|
||||
enum TextFlag {
|
||||
kTextFlagEditable,
|
||||
kTextFlagAutoTab,
|
||||
kTextFlagDoNotWrap
|
||||
};
|
||||
|
||||
enum SizeType {
|
||||
kSizeNone,
|
||||
kSizeSmallest,
|
||||
kSizeSmall,
|
||||
kSizeMedium,
|
||||
kSizeLarge,
|
||||
kSizeLargest
|
||||
};
|
||||
|
||||
struct TextCast : Cast {
|
||||
TextCast(Common::SeekableReadStream &stream);
|
||||
|
||||
byte borderSize;
|
||||
byte gutterSize;
|
||||
byte boxShadow;
|
||||
SizeType borderSize;
|
||||
SizeType gutterSize;
|
||||
SizeType boxShadow;
|
||||
|
||||
byte textType;
|
||||
byte textAlign;
|
||||
byte textShadow;
|
||||
byte textFlags;
|
||||
TextType textType;
|
||||
TextAlignType textAlign;
|
||||
SizeType textShadow;
|
||||
Common::Array<TextFlag> textFlags;
|
||||
};
|
||||
|
||||
enum ButtonType {
|
||||
kTypeButton,
|
||||
kTypeCheckBox,
|
||||
kTypeRadio
|
||||
};
|
||||
|
||||
struct ButtonCast : TextCast {
|
||||
ButtonCast(Common::SeekableReadStream &stream) : TextCast(stream) {
|
||||
buttonType = stream.readUint16BE();
|
||||
buttonType = static_cast<ButtonType>(stream.readUint16BE());
|
||||
}
|
||||
|
||||
//TODO types?
|
||||
uint16 buttonType;
|
||||
ButtonType buttonType;
|
||||
};
|
||||
|
||||
struct CastInfo {
|
||||
|
Loading…
x
Reference in New Issue
Block a user