From 25a233339439ed2cdf6b52f82c57f1adaa59e0bc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 8 Nov 2016 21:51:51 +0100 Subject: DIRECTOR: Split out cast-related classes into separate file --- engines/director/score.cpp | 64 +--------------------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) (limited to 'engines/director/score.cpp') diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 98d25cf3f1..407a671a45 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -31,6 +31,7 @@ #include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" +#include "director/cast.h" #include "director/score.h" #include "director/frame.h" #include "director/archive.h" @@ -829,69 +830,6 @@ void Score::loadFontMap(Common::SeekableSubReadStreamEndian &stream) { } } -BitmapCast::BitmapCast(Common::SeekableSubReadStreamEndian &stream) { - flags = stream.readByte(); - someFlaggyThing = stream.readUint16(); - initialRect = Score::readRect(stream); - boundingRect = Score::readRect(stream); - regY = stream.readUint16(); - regX = stream.readUint16(); - unk1 = unk2 = 0; - - if (someFlaggyThing & 0x8000) { - unk1 = stream.readUint16(); - unk2 = stream.readUint16(); - } - modified = 0; -} - -TextCast::TextCast(Common::SeekableSubReadStreamEndian &stream) { - flags1 = stream.readByte(); - borderSize = static_cast(stream.readByte()); - gutterSize = static_cast(stream.readByte()); - boxShadow = static_cast(stream.readByte()); - textType = static_cast(stream.readByte()); - textAlign = static_cast(stream.readUint16()); - palinfo1 = stream.readUint16(); - palinfo2 = stream.readUint16(); - palinfo3 = stream.readUint16(); - - int t = stream.readUint32(); - assert(t == 0); // So far we saw only 0 here - - initialRect = Score::readRect(stream); - textShadow = static_cast(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); - if (flags & 0xf8) - warning("Unproxessed text cast flags: %x", flags & 0xf8); - - // TODO: FIXME: guesswork - fontId = stream.readByte(); - fontSize = stream.readByte(); - - modified = 0; -} - -ShapeCast::ShapeCast(Common::SeekableSubReadStreamEndian &stream) { - /*byte flags = */ stream.readByte(); - /*unk1 = */ stream.readByte(); - shapeType = static_cast(stream.readByte()); - initialRect = Score::readRect(stream); - pattern = stream.readUint16BE(); - fgCol = stream.readByte(); - bgCol = stream.readByte(); - fillType = stream.readByte(); - lineThickness = stream.readByte(); - lineDirection = stream.readByte(); - modified = 0; -} - Common::Rect Score::readRect(Common::SeekableSubReadStreamEndian &stream) { Common::Rect *rect = new Common::Rect(); rect->top = stream.readUint16(); -- cgit v1.2.3