Exemplo n.º 1
0
ButtonCast::ButtonCast(Common::ReadStreamEndian &stream, uint16 version) : TextCast(stream, version) {
	if (version < 4) {
		buttonType = static_cast<ButtonType>(stream.readUint16BE());
	} else {
		stream.readByte();
		stream.readByte();

		// This has already been populated in the super TextCast constructor
		//initialRect = Score::readRect(stream);
		//boundingRect = Score::readRect(stream);

		buttonType = static_cast<ButtonType>(stream.readUint16BE());
	}
	modified = 0;
}
Exemplo n.º 2
0
ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
	if (version < 4) {
		/*byte flags = */ stream.readByte();
		/*unk1 = */ stream.readByte();
		shapeType = static_cast<ShapeType>(stream.readByte());
		initialRect = Score::readRect(stream);
		pattern = stream.readUint16BE();
		fgCol = stream.readByte();
		bgCol = stream.readByte();
		fillType = stream.readByte();
		lineThickness = stream.readByte();
		lineDirection = stream.readByte();
	} else {
		stream.readByte();
		stream.readByte();

		initialRect = Score::readRect(stream);
		boundingRect = Score::readRect(stream);

		shapeType = kShapeRectangle;
		pattern = 0;
		fgCol = bgCol = 0;
		fillType = 0;
		lineThickness = 1;
		lineDirection = 0;
	}
	modified = 0;
}