Esempio n. 1
0
        public override void GetSettings(ProjectModel.Properties headerSettings)
        {
            base.GetSettings(headerSettings);

            headerSettings["DiscardRedundant"] = DiscardRedundantTiles ? "1" : "0";
            headerSettings["ReducePalette"]    = ReducePalette ? "1" : "0";
            headerSettings["ExportPalette"]    = ExportPalette ? "1" : "0";
            headerSettings["ChrType"]          = Type.ToString();
            headerSettings["Palette"]          = SerializePalette(PaletteAssignment);
            if (TilePalettes != null)
            {
                headerSettings["TilePalettes"] = string.Join(":", TilePalettes.Select(SerializePalette));
            }
        }
Esempio n. 2
0
        public void SetSettings(ProjectModel.Properties headerSettings)
        {
            DiscardRedundantTiles = (headerSettings["DiscardRedundant"] == "1");
            ReducePalette         = (headerSettings["ReducePalette"] == "1");
            ExportPalette         = (headerSettings["ExportPalette"] == "1");
            Enum.TryParse(headerSettings["ChrType"], true, out Type);
            if (!string.IsNullOrWhiteSpace(headerSettings["Palette"]))
            {
                PaletteAssignment = DeserializePalette(headerSettings["Palette"]);
            }

            if (!string.IsNullOrWhiteSpace(headerSettings["TilePalettes"]))
            {
                TilePalettes = headerSettings["TilePalettes"].Split(':').Select(DeserializePalette).ToList();
            }
        }
Esempio n. 3
0
        public override DataPipeline Clone(bool toEditor = false)
        {
            Func <string, string> convertFilePath = (s) => Path.Combine(File.Project.Directory.FullName, s);

            if (toEditor)
            {
                convertFilePath = (s) => File.Project.GetRelativePath(s);
            }

            var pipeline = new ChrPipeline(File, convertFilePath(ChrOutput), String.IsNullOrWhiteSpace(PaletteOutput) ? null : convertFilePath(PaletteOutput));
            var settings = new ProjectModel.Properties();

            GetSettings(settings);
            pipeline.SetSettings(settings);
            return(pipeline);
        }
Esempio n. 4
0
 public virtual void GetSettings(ProjectModel.Properties headerSettings)
 {
 }