public BitmapCastProperties(ref ShockwaveReader input) { int v27 = input.ReadUInt16(); TotalWidth = v27 & 0x7FFF; //TODO: what does that last bit even do.. some sneaky flag? //DIRAPI checks if TotalWidth & 0x8000 == 0 Rectangle = input.ReadRect(); AlphaThreshold = input.ReadByte(); OLE = input.ReadBytes(7).ToArray(); RegistrationPoint = input.ReadPoint(); Flags = (BitmapFlags)input.ReadByte(); if (!input.IsDataAvailable) { return; } BitDepth = input.ReadByte(); if (!input.IsDataAvailable) { return; } Palette = input.ReadInt32(); //TODO: PaletteRef or something if (!IsSystemPalette) { Palette &= 0x7FFF; } }
public ShapeCastProperties(ref ShockwaveReader input) { Type = (ShapeType)input.ReadInt16(); Rectangle = input.ReadRect(); Pattern = input.ReadInt16(); ForegroundColor = input.ReadByte(); BackgroundColor = input.ReadByte(); IsFilled = input.ReadBoolean(); //TODO: LineSize = input.ReadByte(); //-1 LineDirection = input.ReadByte(); //-5 }
public TextCastProperties(ShockwaveReader input) { input.Position += 4; Alignment = (TextAlignment)input.ReadBigEndian <short>(); BackgroundColor = input.ReadColor(); Font = input.ReadBigEndian <short>(); Rectangle = input.ReadRect(); LineHeight = input.ReadBigEndian <short>(); input.Position += 4; ButtonType = input.ReadBigEndian <short>(); }
public TextCastProperties(ref ShockwaveReader input) { input.Advance(4); Alignment = (TextAlignment)input.ReadInt16(); BackgroundColor = input.ReadColor(); Font = input.ReadInt16(); Rectangle = input.ReadRect(); LineHeight = input.ReadInt16(); input.Advance(4); ButtonType = input.ReadInt16(); }
public TextCastProperties(ref ShockwaveReader input) { BorderSize = (SizeType)input.ReadByte(); GutterSize = (SizeType)input.ReadByte(); BoxShadowSize = (SizeType)input.ReadByte(); BoxType = (TextBoxType)input.ReadByte(); Alignment = (TextAlignment)input.ReadInt16(); BackgroundColor = input.ReadColor(); Font = input.ReadInt16(); Rectangle = input.ReadRect(); LineHeight = input.ReadInt16(); TextShadowSize = (SizeType)input.ReadByte(); MysteryFlags = input.ReadByte(); }
public ShapeCastProperties(ref ShockwaveReader input) { Type = (ShapeType)input.ReadInt16(); Rectangle = input.ReadRect(); Pattern = input.ReadInt16(); ForegroundColor = input.ReadByte(); BackgroundColor = input.ReadByte(); byte flags = input.ReadByte(); //TODO: IsFilled = (flags << 1) == 1; Ink = (InkType)(flags & 0x3F); LineSize = (byte)(input.ReadByte() - 1); LineDirection = (byte)(input.ReadByte() - 5); }
public VideoCastProperties(ShockwaveReader input) { Type = input.ReadString((int)input.ReadBigEndian <uint>()); input.Position += 10; byte videoFlags = input.ReadByte(); Streaming = ((videoFlags & 1) == 1); videoFlags = input.ReadByte(); HasSound = ((videoFlags & 1) == 1); PausedAtStart = ((videoFlags & 2) == 2); Flags = (VideoCastFlags)input.ReadByte(); input.Position += 3; Framerate = input.ReadByte(); input.Position += 32; Rectangle = input.ReadRect(); }
public VideoCastProperties(ref ShockwaveReader input) { //TODO: A lot of unknown values. Type = input.ReadString((int)input.ReadUInt32()); input.Advance(10); byte videoFlags = input.ReadByte(); Streaming = ((videoFlags & 1) == 1); videoFlags = input.ReadByte(); HasSound = ((videoFlags & 1) == 1); PausedAtStart = ((videoFlags & 2) == 2); Flags = (VideoCastFlags)input.ReadByte(); input.Advance(3); Framerate = input.ReadByte(); input.Advance(32); Rectangle = input.ReadRect(); }
public BitmapCastProperties(ChunkHeader header, ShockwaveReader input) { bool IsDataAvailable() => input.Position < header.Offset + header.Length; TotalWidth = input.ReadBigEndian <ushort>() & 0x7FFF; Rectangle = input.ReadRect(); AlphaThreshold = input.ReadByte(); OLE = input.ReadBytes(7); //TODO: short regX = input.ReadBigEndian <short>(); short regY = input.ReadBigEndian <short>(); RegistrationPoint = new Point(regX, regY); Flags = (BitmapFlags)input.ReadByte(); if (!IsDataAvailable()) { return; } BitDepth = input.ReadByte(); if (!IsDataAvailable()) { return; } Palette = input.ReadBigEndian <int>(); //TODO: PaletteRef or something if (!IsSystemPalette) { Palette &= 0x7FFF; } }
public ConfigChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; input.ReadInt16(); Version = (DirectorVersion)input.ReadUInt16(); StageRectangle = input.ReadRect(); MinMember = input.ReadInt16(); //Obsolete MaxMember = input.ReadInt16(); //Obsolete Tempo = input.ReadByte(); // == 0 => 20 Remnants.Enqueue(input.ReadByte()); //LightSwitch byte g = input.ReadByte(); //?? byte b = input.ReadByte(); //?? Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); //768 - Seen this one alot in DIRAPI Remnants.Enqueue(input.ReadInt16()); byte r = input.ReadByte(); //?????????? StageBackgroundColor = Color.FromArgb(r, g, b); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551 Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt32()); MovieVersion = (DirectorVersion)input.ReadInt16(); Remnants.Enqueue(input.ReadInt16());//16? Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); RandomNumber = input.ReadInt16(); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); OldDefaultPalette = input.ReadInt16(); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt32()); DefaultPalette = input.ReadInt32(); //TODO: //two int16?? ^^ Remnants.Enqueue(input.ReadInt16()); //two bytes? - IDA Remnants.Enqueue(input.ReadInt16()); if (!input.IsDataAvailable) { return; } DownloadFramesBeforePlaying = input.ReadInt32(); //90 //Zeros Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); }
public ConfigChunk(ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadBigEndian <short>(); Version = (DirectorVersion)input.ReadBigEndian <ushort>(); StageRectangle = input.ReadRect(); MinMember = input.ReadBigEndian <short>(); //Obsolete MaxMember = input.ReadBigEndian <short>(); //Obsolete Tempo = input.ReadByte(); Remnants.Enqueue(input.ReadByte()); byte g = input.ReadByte(); byte b = input.ReadByte(); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); //https://www.youtube.com/watch?v=sA_eCl4Txzs byte r = input.ReadByte(); StageBackgroundColor = Color.FromArgb(r, g, b); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551 Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <int>()); MovieVersion = (DirectorVersion)input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <short>());//16? Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); RandomNumber = input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); OldDefaultPalette = input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <int>()); DefaultPalette = input.ReadBigEndian <int>(); //TODO: Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); DownloadFramesBeforePlaying = input.ReadBigEndian <int>(); //90 //Zeros Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); }