aboutsummaryrefslogtreecommitdiff
path: root/engines/director/score.h
diff options
context:
space:
mode:
authorDmitry Iskrich2016-05-28 18:07:21 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit44e46db5de4211c8056962531fb6483ffe7bebeb (patch)
treef06ef8cdd7da6e1140bbee57c12871b3004543bf /engines/director/score.h
parent604fa102ff35f02b71506fa0b67283ed00139872 (diff)
downloadscummvm-rg350-44e46db5de4211c8056962531fb6483ffe7bebeb.tar.gz
scummvm-rg350-44e46db5de4211c8056962531fb6483ffe7bebeb.tar.bz2
scummvm-rg350-44e46db5de4211c8056962531fb6483ffe7bebeb.zip
DIRECTOR: Refactor cast data loading
Diffstat (limited to 'engines/director/score.h')
-rw-r--r--engines/director/score.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/director/score.h b/engines/director/score.h
index 9e729c2570..299a26cf40 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -76,6 +76,7 @@ struct Cast {
};
struct BitmapCast : Cast {
+ BitmapCast(Common::SeekableReadStream &stream);
Common::Rect boundingRect;
uint16 regX;
uint16 regY;
@@ -83,6 +84,7 @@ struct BitmapCast : Cast {
};
struct ShapeCast : Cast {
+ ShapeCast(Common::SeekableReadStream &stream);
byte shapeType;
uint16 pattern;
byte fgCol;
@@ -93,6 +95,7 @@ struct ShapeCast : Cast {
};
struct TextCast : Cast {
+ TextCast(Common::SeekableReadStream &stream);
byte borderSize;
byte gutterSize;
byte boxShadow;
@@ -104,6 +107,9 @@ struct TextCast : Cast {
};
struct ButtonCast : TextCast {
+ ButtonCast(Common::SeekableReadStream &stream) : TextCast(stream) {
+ buttonType = stream.readUint16BE();
+ }
//TODO types?
uint16 buttonType;
};
@@ -150,7 +156,6 @@ public:
uint8 _skipFrameFlag;
uint8 _blend;
Common::Array<Sprite *> _sprites;
-
};
class Score {
@@ -159,14 +164,10 @@ public:
void readVersion(uint32 rid);
void loadConfig(Common::SeekableReadStream &stream);
void loadCastData(Common::SeekableReadStream &stream);
+ static Common::Rect readRect(Common::SeekableReadStream &stream);
void play();
private:
- BitmapCast *getBitmapCast(Common::SeekableReadStream &stream);
- TextCast *getTextCast(Common::SeekableReadStream &stream);
- ButtonCast *getButtonCast(Common::SeekableReadStream &stream);
- ShapeCast *getShapeCast(Common::SeekableReadStream &stream);
- Common::Rect readRect(Common::SeekableReadStream &stream);
void processEvents();
void display();