diff --git a/DiffDat/DiffDat.cs b/DiffDat/DiffDat.cs index 9e57aa0f..54d1f4e2 100644 --- a/DiffDat/DiffDat.cs +++ b/DiffDat/DiffDat.cs @@ -34,7 +34,7 @@ namespace SabreTools Build.Start("DiffDat"); List inputs = new List(); - 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 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); } } diff --git a/README.MD b/README.MD index f387b676..93ee1400 100644 --- a/README.MD +++ b/README.MD @@ -71,9 +71,9 @@ Experimental tool for trimming all files in DAT (or folder of DATs) so that they

A program to create a DAT based on the differences between two or more input DATs.

    -
  • Intended for use with DATs in the same "family", e.g. a DAT and a fixdat generated from it or two different fixdats
  • Read in from commandline, drag-and-drop, a directory, or any combination
  • Output type automatically determined by the first input file
  • +
  • Merge the output DAT so no partial duplicates are included
DatToMiss diff --git a/SabreHelper/Build.cs b/SabreHelper/Build.cs index e1084772..38353c47 100644 --- a/SabreHelper/Build.cs +++ b/SabreHelper/Build.cs @@ -163,7 +163,8 @@ Usage: DiffDat [options] [filename] [filename] ... Options: -h, -?, --help Show this help dialog - -l, --log Enable log to file"); + -l, --log Enable log to file + -m, --merge Enable merging in the created DAT"); break; default: Console.Write("This is the default help output");