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; } }