示例#1
0
        public void Load(string filename)
        {
            this.palfilename = filename;
            this.PaletteName = Path.GetFileNameWithoutExtension(filename);
            palette          = new PaletteColor[256];
            for (int i = 0; i < 256; i++)
            {
                palette[i] = new PaletteColor(Color.FromArgb(255, i, i, i));
            }

            if (IsTSPal(filename))
            {
                LoadTSPal(filename);
            }

            if (IsJASCPal(filename))
            {
                LoadJASCPal(filename);
            }

            if (IsPaletteSetup(filename))
            {
                CPalette tmp = Cinimanager.LoadPaletteSetup(filename)[0];
                this.palfilename = tmp.palfilename;
                this.PaletteName = tmp.PaletteName;
                this.palette     = tmp.palette;
            }
        }
示例#2
0
 public CPalette()
 {
     palette = new PaletteColor[256];
     for (int i = 0; i < 256; i++)
     {
         palette[i] = new PaletteColor(Color.FromArgb(255, i, i, i));
     }
     PaletteName = "Null";
 }