mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Enable merging of the ouput
This commit is contained in:
@@ -34,7 +34,7 @@ namespace SabreTools
|
||||
Build.Start("DiffDat");
|
||||
|
||||
List<String> inputs = new List<String>();
|
||||
bool tofile = false, help = false;
|
||||
bool tofile = false, help = false, merge = false; ;
|
||||
foreach (string arg in args)
|
||||
{
|
||||
switch (arg)
|
||||
@@ -48,6 +48,10 @@ namespace SabreTools
|
||||
case "--log":
|
||||
tofile = true;
|
||||
break;
|
||||
case "-m":
|
||||
case "--merge":
|
||||
merge = true;
|
||||
break;
|
||||
default:
|
||||
// Add actual files to the list of inputs
|
||||
if (File.Exists(arg.Replace("\"", "")))
|
||||
@@ -84,6 +88,13 @@ namespace SabreTools
|
||||
List<RomData> B = RomManipulation.Parse(input, 0, 0, logger);
|
||||
A = RomManipulation.Diff(A, B);
|
||||
}
|
||||
|
||||
// If we want a merged list, send it for merging before outputting
|
||||
if (merge)
|
||||
{
|
||||
A = RomManipulation.Merge(A);
|
||||
}
|
||||
|
||||
Output.WriteToDat("diffdat", "diffdat", "", "", "DiffDat", "SabreTools", false, !RomManipulation.IsXmlDat(inputs[0]), "", A, logger);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user