Ejemplo n.º 1
0
 public PALdataSection(Color[] Colors)
 {
     this.Header   = new PAL.PALdataSection.PALdataSectionHeader("PAL data", (uint)(Colors.Length * 4));
     this.Unknown  = (ushort)768;
     this.NrColors = (ushort)Colors.Length;
     this.Palette  = Colors;
 }
Ejemplo n.º 2
0
            public PALdataSection(EndianBinaryReader er, out bool OK)
            {
                bool OK1;

                this.Header = new PAL.PALdataSection.PALdataSectionHeader(er, "PAL data", out OK1);
                if (!OK1)
                {
                    OK = false;
                }
                else
                {
                    this.Unknown  = er.ReadUInt16();
                    this.NrColors = er.ReadUInt16();
                    this.Palette  = new Color[(int)this.NrColors];
                    for (int index = 0; index < (int)this.NrColors; ++index)
                    {
                        this.Palette[index] = Color.FromArgb(er.ReadInt32());
                    }
                    OK = true;
                }
            }