diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-27 08:22:36 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-27 08:26:43 +0300 |
commit | f4800d51617609dcde745e8c826e14bf30a8ad9a (patch) | |
tree | c659fb07334861175c1609d7bc55e21a4e84f002 | |
parent | 7a4d9270dcffa9684607745db22f91e9dbec93db (diff) |
Command arguments moved to constants.
-rw-r--r-- | Benchmarks/Program.cs | 22 | ||||
-rw-r--r-- | NesTiler/CmdArgs.cs | 261 | ||||
-rw-r--r-- | NesTiler/Program.cs | 131 | ||||
-rw-r--r-- | Tests/Program.cs | 22 |
4 files changed, 335 insertions, 101 deletions
diff --git a/Benchmarks/Program.cs b/Benchmarks/Program.cs index 97a0c58..f4f03c9 100644 --- a/Benchmarks/Program.cs +++ b/Benchmarks/Program.cs @@ -200,7 +200,7 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "-input-0", $"{imagePath}",
+ "--in-0", $"{imagePath}",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-name-table-0", NameTablePath(prefix, 0),
"--out-attribute-table-0", AttrTablePath(prefix, 0),
@@ -221,8 +221,8 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks var prefix = Path.GetFileNameWithoutExtension(imagePath1) + "_" + Path.GetFileNameWithoutExtension(imagePath2);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "-input-0", $"{imagePath1}",
- "-input-1", $"{imagePath2}",
+ "--in-0", $"{imagePath1}",
+ "--in-1", $"{imagePath2}",
"--out-pattern-table", PatternTablePath(prefix, 0),
"--out-name-table-0", NameTablePath(prefix, 0),
"--out-name-table-1", NameTablePath(prefix, 1),
@@ -246,8 +246,8 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "-input-0", $"{imagePath}:0:128",
- "-input-1", $"{imagePath}:128:112",
+ "--in-0", $"{imagePath}:0:128",
+ "--in-1", $"{imagePath}:128:112",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-name-table-0", NameTablePath(prefix, 0),
@@ -271,8 +271,8 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "-input-0", $"{imagePath}:0:128",
- "-input-1", $"{imagePath}:128:112",
+ "--in-0", $"{imagePath}:0:128",
+ "--in-1", $"{imagePath}:128:112",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-name-table-0", NameTablePath(prefix, 0),
@@ -297,10 +297,10 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "-input-0", $"{imagePath}:0:64",
- "-input-1", $"{imagePath}:64:64",
- "-input-2", $"{imagePath}:128:64",
- "-input-3", $"{imagePath}:192:48",
+ "--in-0", $"{imagePath}:0:64",
+ "--in-1", $"{imagePath}:64:64",
+ "--in-2", $"{imagePath}:128:64",
+ "--in-3", $"{imagePath}:192:48",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-pattern-table-2", PatternTablePath(prefix, 2),
diff --git a/NesTiler/CmdArgs.cs b/NesTiler/CmdArgs.cs new file mode 100644 index 0000000..8288cc2 --- /dev/null +++ b/NesTiler/CmdArgs.cs @@ -0,0 +1,261 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace com.clusterrr.Famicom.NesTiler +{ + interface IArg + { + public string Short { get; } + public string Long { get; } + public string? Params { get; } + public string Description { get; } + public bool HasIndex { get; } + + public static IArg[] Args = new IArg[] + { + new ArgIn(), + new ArgColors(), + new ArgMode(), + new ArgBgColor(), + new ArgEnablePalettes(), + new ArgPalette(), + new ArgPatternOffset(), + new ArgAttributeTableYOffset(), + new ArgSharePatternTable(), + new ArgIgnoreTilesRange(), + new ArgLossy(), + new ArgOutPreview(), + new ArgOutPalette(), + new ArgOutPatternTable(), + new ArgOutNameTable(), + new ArgOutAttributeTable(), + new ArgOutTilesCsv(), + new ArgOutPalettesCsv(), + new ArgOutColorsTable(), + new ArgQuiet() + }; + } + + internal class ArgIn : IArg + { + public const string S = "i"; + public const string L = "in"; + public string? Params { get; } = "<file>[:offset[:height]]"; + public string Description { get; } = "input file number #, optionally cropped vertically"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgColors : IArg + { + public const string S = "c"; + public const string L = "colors"; + public string? Params { get; } = "<file>"; + public string Description { get; } = $"JSON or PAL file with the list of available colors\n(default - {Program.DEFAULT_COLORS_FILE})"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgMode : IArg + { + public const string S = "m"; + public const string L = "mode"; + public string? Params { get; } = "bg|sprites8x8|sprites8x16"; + public string Description { get; } = "mode: backgrounds, 8x8 sprites or 8x16 sprites (default - bg)"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgBgColor : IArg + { + public const string S = "b"; + public const string L = "bg-color"; + public string? Params { get; } = "<color>"; + public string Description { get; } = "background color in HTML color format (default - auto)"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgEnablePalettes : IArg + { + public const string S = "e"; + public const string L = "enable-palettes"; + public string? Params { get; } = "<palettes>"; + public string Description { get; } = "zero-based comma separated list of palette numbers to use\n(default - 0,1,2,3)"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgPalette : IArg + { + public const string S = "p"; + public const string L = "palette"; + public string? Params { get; } = "<colors>"; + public string Description { get; } = "comma separated list of colors to use in palette number #\n(default - auto)"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgPatternOffset : IArg + { + public const string S = "o"; + public const string L = "pattern-offset"; + public string? Params { get; } = "<tile_id>"; + public string Description { get; } = "first tile ID for pattern table for file number # (default - 0)"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgAttributeTableYOffset : IArg + { + public const string S = "y"; + public const string L = "attribute-table-y-offset"; + public string? Params { get; } = "<pixels>"; + public string Description { get; } = "vertical offset for attribute table in pixels (default - 0)"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgSharePatternTable : IArg + { + public const string S = "s"; + public const string L = "share-pattern-table"; + public string? Params { get; } = null; + public string Description { get; } = "vertical offset for attribute table in pixels (default - 0)"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgIgnoreTilesRange : IArg + { + public const string S = "r"; + public const string L = "ignore-tiles-range"; + public string? Params { get; } = null; + public string Description { get; } = "option to disable tile ID overflow check"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgLossy : IArg + { + public const string S = "l"; + public const string L = "lossy"; + public string? Params { get; } = null; + public string Description { get; } = "option to ignore palettes loss, produces distorted image\nif there are too many colors"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutPreview : IArg + { + public const string S = "v"; + public const string L = "out-preview"; + public string? Params { get; } = "<file.png>"; + public string Description { get; } = "output filename for preview of image number #"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutPalette : IArg + { + public const string S = "t"; + public const string L = "out-palette"; + public string? Params { get; } = "<file>"; + public string Description { get; } = "output filename for palette number #"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutPatternTable : IArg + { + public const string S = "n"; + public const string L = "out-pattern-table"; + public string? Params { get; } = "<file>"; + public string Description { get; } = "output filename for pattern table of image number #"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutNameTable : IArg + { + public const string S = "a"; + public const string L = "out-name-table"; + public string? Params { get; } = "<file>"; + public string Description { get; } = "output filename for nametable of image number #"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutAttributeTable : IArg + { + public const string S = "u"; + public const string L = "out-attribute-table"; + public string? Params { get; } = "<file>"; + public string Description { get; } = "output filename for attribute table of image number #"; + public bool HasIndex { get; } = true; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutTilesCsv : IArg + { + public const string S = "z"; + public const string L = "out-tiles-csv"; + public string? Params { get; } = "<file.csv>"; + public string Description { get; } = "output filename for tiles info in CSV format"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutPalettesCsv : IArg + { + public const string S = "x"; + public const string L = "out-palettes-csv"; + public string? Params { get; } = "<file.csv>"; + public string Description { get; } = "output filename for palettes info in CSV format"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgOutColorsTable : IArg + { + public const string S = "g"; + public const string L = "out-colors-table"; + public string? Params { get; } = "<file.png>"; + public string Description { get; } = "output filename for graphical table of available colors\n(from \"--colors\" option)"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } + + class ArgQuiet : IArg + { + public const string S = "q"; + public const string L = "quiet"; + public string? Params { get; } = null; + public string Description { get; } = "suppress console output"; + public bool HasIndex { get; } = false; + public string Short { get; } = S; + public string Long { get; } = L; + } +} diff --git a/NesTiler/Program.cs b/NesTiler/Program.cs index 748bde0..15ea2c2 100644 --- a/NesTiler/Program.cs +++ b/NesTiler/Program.cs @@ -15,10 +15,10 @@ namespace com.clusterrr.Famicom.NesTiler {
public class Program
{
- const string REPO_PATH = "https://github.com/ClusterM/nestiler";
- const string DEFAULT_COLORS_FILE = @"nestiler-colors.json";
- static DateTime BUILD_TIME = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddSeconds(long.Parse(Properties.Resources.buildtime.Trim()));
- const int MAX_BG_COLOR_AUTODETECT_ITERATIONS = 5;
+ public const string REPO_PATH = "https://github.com/ClusterM/nestiler";
+ public const string DEFAULT_COLORS_FILE = @"nestiler-colors.json";
+ public static DateTime BUILD_TIME = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddSeconds(long.Parse(Properties.Resources.buildtime.Trim()));
+ public const int MAX_BG_COLOR_AUTODETECT_ITERATIONS = 5;
static byte[] FORBIDDEN_COLORS = new byte[] { 0x0D, 0x0E, 0x0F, 0x1E, 0x1F, 0x2E, 0x2F, 0x3E, 0x3F };
enum TilesMode
@@ -44,27 +44,13 @@ namespace com.clusterrr.Famicom.NesTiler Console.WriteLine($"Usage: {Path.GetFileName(Process.GetCurrentProcess()?.MainModule?.FileName)} <options>");
Console.WriteLine();
Console.WriteLine("Available options:");
- // TODO: move options to constants
- Console.WriteLine("{0,-4} {1,-40}{2}", "-i#,", "--in-<#> <file>[:offset[:height]]", "input file number #, optionally cropped vertically");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-c,", "--colors <file>", $"JSON or PAL file with the list of available colors (default - {DEFAULT_COLORS_FILE})");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-m,", "--mode bg|sprites8x8|sprites8x16", "mode: backgrounds, 8x8 sprites or 8x16 sprites (default - bg)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-b,", "--bg-color <color>", "background color in HTML color format (default - autodetected)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-e,", "--enable-palettes <palettes>", "zero-based comma separated list of palette numbers to use (default - 0,1,2,3)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-p#,", "--palette-<#>", "comma separated list of colors to use in palette number # (default - auto)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-o#,", "--pattern-offset-<#>", "first tile ID for pattern table for file number # (default - 0)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-y#,", "--attribute-table-y-offset-#", "vertical offset for attribute table in pixels");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-s,", "--share-pattern-table", "use one pattern table for all images");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-r,", "--ignore-tiles-range", "option to disable tile ID overflow check");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-l,", "--lossy", "option to ignore palettes loss, produces distorted image if there are too many colors");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-v#,", "--out-preview-<#> <file.png>", "output filename for preview of image number #");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-t#,", "--out-palette-<#> <file>", "output filename for palette number #");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-n#,", "--out-pattern-table-<#> <file>", "output filename for pattern table of image number #");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-a#,", "--out-name-table-<#> <file>", "output filename for nametable of image number #");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-u#,", "--out-attribute-table-<#> <file>", "output filename for attribute table of image number #");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-z,", "--out-tiles-csv <file.csv>", "output filename for tiles info in CSV format");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-x,", "--out-palettes-csv <file.csv>", "output filename for palettes info in CSV format");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-g,", "--out-colors-table <file.png>", "output filename for graphical table of available colors (from \"--colors\" option)");
- Console.WriteLine("{0,-4} {1,-40}{2}", "-q,", "--quiet", "suppress console output");
+ foreach (var arg in IArg.Args)
+ {
+ var s = "-" + (arg.HasIndex ? (arg.Short + "<#>") : arg.Short);
+ var l = "--" + (arg.HasIndex ? (arg.Long + "-<#>") : arg.Long) + (arg.Params != null ? " " + arg.Params : "");
+ var description = arg.Description.Replace("\n", "\n" + String.Join("", Enumerable.Repeat(" ", 48)));
+ Console.WriteLine("{0,-5} {1,-42}{2}", s, l, description);
+ }
}
public static int Main(string[] args)
@@ -110,7 +96,6 @@ namespace com.clusterrr.Famicom.NesTiler string? outTilesCsv = null;
string? outPalettesCsv = null;
string? outColorsTable = null;
- var console = (string text) => { if (!quiet) Console.WriteLine(text); };
// Data
var images = new Dictionary<int, FastBitmap>();
@@ -138,20 +123,19 @@ namespace com.clusterrr.Famicom.NesTiler int valueInt;
switch (param)
{
- case "i":
- case "in":
- case "input":
+ case ArgIn.S:
+ case ArgIn.L:
imageFiles[indexNum] = value;
i++;
nothingToDo = false;
break;
- case "c":
- case "colors":
+ case ArgColors.S:
+ case ArgColors.L:
colorsFile = value;
i++;
break;
- case "m":
- case "mode":
+ case ArgMode.S:
+ case ArgMode.L:
switch (value.ToLower())
{
case "sprite":
@@ -185,10 +169,8 @@ namespace com.clusterrr.Famicom.NesTiler }
i++;
break;
- case "b":
- case "bgcolor":
- case "bg-color":
- case "background-color":
+ case ArgBgColor.S:
+ case ArgBgColor.L:
if (value != "auto")
{
try
@@ -202,8 +184,8 @@ namespace com.clusterrr.Famicom.NesTiler }
i++;
break;
- case "e":
- case "enable-palettes":
+ case ArgEnablePalettes.S:
+ case ArgEnablePalettes.L:
{
var paletteNumbersStr = value.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
for (int pal = 0; pal < paletteEnabled.Length; pal++)
@@ -221,16 +203,16 @@ namespace com.clusterrr.Famicom.NesTiler }
i++;
break;
- case "p":
- case "palette":
+ case ArgPalette.S:
+ case ArgPalette.L:
{
var colors = value.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(c => ColorTranslator.FromHtml(c));
fixedPalettes[indexNum] = new Palette(colors);
}
i++;
break;
- case "o":
- case "pattern-offset":
+ case ArgPatternOffset.S:
+ case ArgPatternOffset.L:
if (!int.TryParse(value, out valueInt))
throw new ArgumentException($"\"{valueInt}\" is not valid integer value.", param);
if (valueInt < 0 || valueInt >= 256)
@@ -239,8 +221,8 @@ namespace com.clusterrr.Famicom.NesTiler patternTableStartOffsetShared = patternTableStartOffsets[indexNum];
i++;
break;
- case "y":
- case "attribute-table-y-offset":
+ case ArgAttributeTableYOffset.S:
+ case ArgAttributeTableYOffset.L:
if (!int.TryParse(value, out valueInt))
throw new ArgumentException($"\"{valueInt}\" is not valid integer value.", param);
if (valueInt % 8 != 0)
@@ -250,72 +232,64 @@ namespace com.clusterrr.Famicom.NesTiler attributeTableYOffsets[indexNum] = valueInt;
i++;
break;
- case "s":
- case "share-pattern-table":
+ case ArgSharePatternTable.S:
+ case ArgSharePatternTable.L:
sharePatternTable = true;
break;
- case "r":
- case "ignoretilesrange":
- case "ignore-tiles-range":
+ case ArgIgnoreTilesRange.S:
+ case ArgIgnoreTilesRange.L:
ignoreTilesRange = true;
break;
- case "l":
- case "lossy":
+ case ArgLossy.S:
+ case ArgLossy.L:
lossy = true;
break;
- case "v":
- case "out-preview":
- case "output-preview":
+ case ArgOutPreview.S:
+ case ArgOutPreview.L:
outPreview[indexNum] = value;
i++;
break;
- case "t":
- case "out-palette":
- case "output-palette":
+ case ArgOutPalette.S:
+ case ArgOutPalette.L:
if (indexNum < 0 || indexNum > 3)
throw new ArgumentException($"Palette index must be between 0 and 3.", param);
outPalette[indexNum] = value;
i++;
break;
- case "n":
- case "out-pattern-table":
- case "output-pattern-table":
+ case ArgOutPatternTable.S:
+ case ArgOutPatternTable.L:
outPatternTable[indexNum] = value;
outPatternTableShared = value;
i++;
break;
- case "a":
- case "out-name-table":
- case "output-name-table":
- case "out-nametable":
- case "output-nametable":
+ case ArgOutNameTable.S:
+ case ArgOutNameTable.L:
outNameTable[indexNum] = value;
i++;
break;
- case "u":
- case "out-attribute-table":
- case "output-attribute-table":
+ case ArgOutAttributeTable.S:
+ case ArgOutAttributeTable.L:
outAttributeTable[indexNum] = value;
i++;
break;
- case "z":
- case "out-tiles-csv":
+ case ArgOutTilesCsv.S:
+ case ArgOutTilesCsv.L:
outTilesCsv = value;
i++;
break;
- case "x":
- case "out-palettes-csv":
+ case ArgOutPalettesCsv.S:
+ case ArgOutPalettesCsv.L:
outPalettesCsv = value;
i++;
break;
- case "g":
- case "out-colors-table":
+ case ArgOutColorsTable.S:
+ case ArgOutColorsTable.L:
outColorsTable = value;
i++;
nothingToDo = false;
break;
- case "q":
- case "quiet":
+ case ArgQuiet.S:
+ case ArgQuiet.L:
quiet = true;
break;
default:
@@ -332,12 +306,11 @@ namespace com.clusterrr.Famicom.NesTiler return 1;
}
+ Trace.Listeners.Clear();
if (!quiet)
{
PrintAppInfo();
- Trace.Listeners.Clear();
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
- Trace.AutoFlush = true;
}
// Some input data checks
diff --git a/Tests/Program.cs b/Tests/Program.cs index a883927..843ef0d 100644 --- a/Tests/Program.cs +++ b/Tests/Program.cs @@ -183,7 +183,7 @@ namespace com.clusterrr.Famicom.NesTiler.Tests var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "--input-0", $"{imagePath}",
+ "--in-0", $"{imagePath}",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-name-table-0", NameTablePath(prefix, 0),
"--out-attribute-table-0", AttrTablePath(prefix, 0),
@@ -218,8 +218,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests var prefix = Path.GetFileNameWithoutExtension(imagePath1) + "_" + Path.GetFileNameWithoutExtension(imagePath2);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "--input-0", $"{imagePath1}",
- "--input-1", $"{imagePath2}",
+ "--in-0", $"{imagePath1}",
+ "--in-1", $"{imagePath2}",
"--out-pattern-table", PatternTablePath(prefix, 0),
"--out-name-table-0", NameTablePath(prefix, 0),
"--out-name-table-1", NameTablePath(prefix, 1),
@@ -259,8 +259,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "--input-0", $"{imagePath}:0:128",
- "--input-1", $"{imagePath}:128:112",
+ "--in-0", $"{imagePath}:0:128",
+ "--in-1", $"{imagePath}:128:112",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-name-table-0", NameTablePath(prefix, 0),
@@ -301,8 +301,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "--input-0", $"{imagePath}:0:128",
- "--input-1", $"{imagePath}:128:112",
+ "--in-0", $"{imagePath}:0:128",
+ "--in-1", $"{imagePath}:128:112",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-name-table-0", NameTablePath(prefix, 0),
@@ -344,10 +344,10 @@ namespace com.clusterrr.Famicom.NesTiler.Tests var prefix = Path.GetFileNameWithoutExtension(imagePath);
var args = new string[] {
"--enable-palettes", "0,1,2,3",
- "--input-0", $"{imagePath}:0:64",
- "--input-1", $"{imagePath}:64:64",
- "--input-2", $"{imagePath}:128:64",
- "--input-3", $"{imagePath}:192:48",
+ "--in-0", $"{imagePath}:0:64",
+ "--in-1", $"{imagePath}:64:64",
+ "--in-2", $"{imagePath}:128:64",
+ "--in-3", $"{imagePath}:192:48",
"--out-pattern-table-0", PatternTablePath(prefix, 0),
"--out-pattern-table-1", PatternTablePath(prefix, 1),
"--out-pattern-table-2", PatternTablePath(prefix, 2),
|