Exemple #1
0
 public ConfigInfos(string config, TilesetSize finalSize, ConfigInfos defaultInfos)
 {
     this.extractSize(config, defaultInfos.size);
     this.extraPatchInfos(config, finalSize);
     if (this.infos.Count != 0)
         return;
     this.infos = defaultInfos.infos;
 }
Exemple #2
0
 public static ConfigInfos getDefaultInfos(TilesetSize finalSize)
 {
     if (ConfigInfos.ConfigDefaultInfos == null)
         ConfigInfos.ConfigDefaultInfos = new ConfigInfos(new List<ConfigPatchInfo>()
     {
       new ConfigPatchInfo("filter", 0, 0, 16, 16, 0, 0, finalSize, finalSize)
     }, finalSize);
     return ConfigInfos.ConfigDefaultInfos;
 }
Exemple #3
0
 public TilesetPatch(string config, Bitmap bitmap, Bitmap filter, TilesetSize finalSize, ConfigInfos defaultConfigInfos)
 {
     ConfigInfos configInfos = new ConfigInfos(config, finalSize, defaultConfigInfos);
     this.chunklist = new List<TilesetPatchChunk>();
     foreach (ConfigPatchInfo configPatchInfo in (IEnumerable<ConfigPatchInfo>)configInfos.infos) {
         try {
             this.chunklist.Add(new TilesetPatchChunk(configPatchInfo, bitmap, filter));
         } catch {
         }
     }
 }
Exemple #4
0
 public static ConfigInfos getRoughWallInfos(TilesetSize finalSize)
 {
     if (ConfigInfos.ConfigRoughWallInfos == null)
         ConfigInfos.ConfigRoughWallInfos = new ConfigInfos(new List<ConfigPatchInfo>()
     {
       new ConfigPatchInfo("ground", 3, 8, 4, 1, 3, 8, finalSize, finalSize),
       new ConfigPatchInfo("ground", 8, 8, 4, 1, 8, 8, finalSize, finalSize),
       new ConfigPatchInfo("ground", 12, 9, 2, 1, 12, 9, finalSize, finalSize),
       new ConfigPatchInfo("ground", 9, 10, 4, 1, 9, 10, finalSize, finalSize)
     }, finalSize);
     return ConfigInfos.ConfigRoughWallInfos;
 }
Exemple #5
0
 private void InitializePrefix(string prefix)
 {
     this.prefix = prefix.ToLower();
     if (prefix == "wall")
         this.defaultConfigInfos = ConfigInfos.getWallInfos(new TilesetSize(16, 16, 16, 16));
     else if (prefix == "rough" || prefix == "symbol")
         this.defaultConfigInfos = ConfigInfos.getRoughWallInfos(new TilesetSize(16, 16, 16, 16));
     else
         this.defaultConfigInfos = ConfigInfos.getDefaultInfos(new TilesetSize(16, 16, 16, 16));
 }
Exemple #6
0
 public static ConfigInfos getWallInfos(TilesetSize finalSize)
 {
     if (ConfigInfos.ConfigWallInfos == null)
         ConfigInfos.ConfigWallInfos = new ConfigInfos(new List<ConfigPatchInfo>()
     {
       new ConfigPatchInfo("filter", 7, 11, 8, 2, 7, 11, finalSize, finalSize),
       new ConfigPatchInfo("filter", 3, 13, 4, 1, 3, 13, finalSize, finalSize)
     }, finalSize);
     return ConfigInfos.ConfigWallInfos;
 }