public void ProcessExportedFiles(string defaultDataFolder, IGraphicsInfo gInfo) { if (!(gInfo is ScbgConstants scbgInfo)) { return; } string data = Path.Combine(defaultDataFolder, scbgInfo.Data); string info = Path.Combine(defaultDataFolder, scbgInfo.Info); bool tiled = true; string pngDir = Path.Combine(defaultDataFolder, scbgInfo.PngFolder); SCBGCollection.Load(data, info).SaveAsPngs(pngDir, tiled); }
public ValueTask ExecuteAsync(IConsole console) { if (DestinationFolder == null) { DestinationFolder = Path.Combine(Path.GetDirectoryName(FilePath), Path.GetFileNameWithoutExtension(FilePath) + " - Unpacked"); } Directory.CreateDirectory(DestinationFolder); using var br = new BinaryReader(File.OpenRead(FilePath)); SCBGCollection .Load(FilePath, InfoFile) .SaveAsPngs(DestinationFolder, tiled: Tiled); console.Output.WriteLine("Complete!"); return(default);