Example #1
0
        protected override void ReadFromStream(System.IO.BinaryReader reader)
        {
            base.ReadFromStream(reader);

            ushort nrPackets = reader.ReadUInt16();
            for (int i = 0; i < nrPackets; i++)
            {
                byte skipCount = reader.ReadByte();
                byte copyCount = reader.ReadByte();

                if (copyCount == 0)
                {
                    byte[] rgbData = reader.ReadBytes(256 * 3);
                    for (int j = 0; j < 256; j++)
                    {
                        Colors[j] = new FLCColor(rgbData[j * 3 + 0], rgbData[j * 3 + 1], rgbData[j * 3 + 2], 255);
                    }
                }
                else
                {
                }
            }
        }
Example #2
0
 public FLCColor[] GetFramebufferCopy()
 {
     FLCColor[] result = new FLCColor[framebuffer.Length];
     Array.Copy(framebuffer, result, framebuffer.Length);
     return result;
 }