示例#1
0
        public NCLR(byte[] file)
        {
            EndianBinaryReader er = new EndianBinaryReader((Stream) new MemoryStream(file), Endianness.LittleEndian);
            bool OK;

            this.Header = new FileHeader.HeaderInfo(er, "RLCN", out OK);
            if (!OK)
            {
                er.BaseStream.Position = 0L;
                this.Header            = new FileHeader.HeaderInfo(er, "RPCN", out OK);
            }
            if (!OK)
            {
                // TODO: Message box
                //int num1 = (int) MessageBox.Show("Error 0");
            }
            else
            {
                this.PaletteData = new NCLR.Palettedata(er, out OK);
                if (!OK)
                {
                    // TODO: Message box
                    //int num2 = (int) MessageBox.Show("Error 1");
                }
            }
            er.Close();
        }
示例#2
0
 public NCLR(byte[] Palette, Graphic.GXTexFmt mode)
 {
     this.Header      = new FileHeader.HeaderInfo("RLCN", (ushort)1);
     this.PaletteData = new NCLR.Palettedata(Palette, mode);
 }