2 using System.Diagnostics;
4 using System.Text.RegularExpressions;
9 using Hjg.Pngcs.Chunks;
12 using Vintagestory.GameContent;
14 namespace ShardProcessor
16 public partial class MainClass
18 //private ILogger Logger { get; set; }
19 const string chunkFile_filter = @"*_*.png";
20 static Regex chunkShardRegex = new Regex(@"(?<X>[\d]+)_(?<Z>[\d]+)\.png", RegexOptions.Singleline);
21 static string mapPath;
22 internal const string _chunkPath = @"Chunks";
23 internal const string _minimapTilesPath = @"Tiles";
26 -Process existing PNGs: Report/Dump contents of Chunk Metadata, as per current version
27 -Grayscale Heightmap extraction from P.Buf heightmap from shards
28 -Extract contents of game's SQLLite map DB, INTO Automap type shards...
29 -Other stuff? chunk fixing / validation?
31 public static void Main(string[ ] args)
33 Console.WriteLine("AUTOMAP Offline Shard processor v0.1");
34 //Called once - thus it can only be in a static constructor.
35 PngChunk.FactoryRegister(PngMetadataChunk.ID, typeof(PngMetadataChunk));
41 private static void ArgsDecoder(string[ ] args)
43 //#1 Path to maps '~/ApplicationData/vintagestory/Map/World_1234567890
44 mapPath = args.Length > 1 ? args[1] : String.Empty;
46 //#0 Command: Heightmaps (Generation from existing shard data)
47 string command = args[0];
68 case @"--protoheader":
77 Console.WriteLine("Unrecognized Command: {0}", command);