コード例 #1
0
ファイル: FLCChunkColor256.cs プロジェクト: CAMongrel/FLCLib
        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
                {
                }
            }
        }
コード例 #2
0
ファイル: FLCFrameBuffer.cs プロジェクト: CAMongrel/FLCLib
 public FLCColor[] GetFramebufferCopy()
 {
     FLCColor[] result = new FLCColor[framebuffer.Length];
     Array.Copy(framebuffer, result, framebuffer.Length);
     return result;
 }