diff --git a/DATabase/DATabase.cs b/DATabase/DATabase.cs
index bc19b178..335f5ff9 100644
--- a/DATabase/DATabase.cs
+++ b/DATabase/DATabase.cs
@@ -521,7 +521,7 @@ namespace SabreTools
// Merge, diff, and dedupe at least 2 DATs
else if (merge || diff)
{
- InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, superdat, cascade, inplace, outdir);
+ InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, superdat, cascade, inplace, outdir, clean);
}
// Split a DAT by available hashes
@@ -1380,6 +1380,8 @@ Make a selection:
///
///
///
+ /// Optional param for output directory
+ /// True to clean the game names to WoD standard, false otherwise (default)
private static void InitConvert(string filename, OutputFormat outputFormat, string outdir = "", bool clean = false)
{
// Clean the input strings
@@ -1545,8 +1547,10 @@ Make a selection:
/// True if DATs should be merged in SuperDAT style, false otherwise
/// True if the outputted diffs should be cascaded, false otherwise
/// True if cascaded diffs overwrite the source files, false otherwise
+ /// Output directory for the files (blank is default)
+ /// True to clean the game names to WoD standard, false otherwise (default)
private static void InitMergeDiff(List inputs, string name, string desc, string cat, string version, string author,
- bool diff, bool dedup, bool bare, bool forceunpack, bool old, bool superdat, bool cascade, bool inplace, string outdir = "")
+ bool diff, bool dedup, bool bare, bool forceunpack, bool old, bool superdat, bool cascade, bool inplace, string outdir = "", bool clean = false)
{
// Make sure there are no folders in inputs
List newInputs = new List();
@@ -1579,7 +1583,7 @@ Make a selection:
}
}
- MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, superdat, cascade, inplace, outdir, _logger);
+ MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, superdat, cascade, inplace, outdir, clean _logger);
md.Process();
}
diff --git a/DATabase/MergeDiff.cs b/DATabase/MergeDiff.cs
index 7ce31619..ad1ca012 100644
--- a/DATabase/MergeDiff.cs
+++ b/DATabase/MergeDiff.cs
@@ -21,6 +21,7 @@ namespace SabreTools
private bool _superdat;
private bool _cascade;
private bool _inplace;
+ private bool _clean;
// User specified strings
private string _name;
@@ -53,9 +54,11 @@ namespace SabreTools
/// True if the outputted diffs should be cascaded, false otherwise
/// True if cascaded diffs overwrite the source files, false otherwise
/// New output directory for outputted DATs (blank means default)
+ /// True to clean the game names to WoD standard, false otherwise (default)
/// Logger object for console and file output
public MergeDiff(List inputs, string name, string desc, string cat, string version, string author,
- bool diff, bool dedup, bool bare, bool forceunpack, bool old, bool superdat, bool cascade, bool inplace, string outdir, Logger logger)
+ bool diff, bool dedup, bool bare, bool forceunpack, bool old, bool superdat, bool cascade, bool inplace,
+ string outdir, bool clean, Logger logger)
{
_inputs = inputs;
_name = name;
@@ -72,6 +75,7 @@ namespace SabreTools
_cascade = cascade;
_inplace = inplace;
_outdir = outdir.Replace("\"", "");
+ _clean = clean;
_logger = logger;
}
@@ -123,7 +127,7 @@ namespace SabreTools
foreach (string input in _inputs)
{
_logger.User("Adding DAT: " + input.Split('¬')[0]);
- userData = RomManipulation.Parse(input.Split('¬')[0], i, 0, userData, _logger);
+ userData = RomManipulation.Parse(input.Split('¬')[0], i, 0, userData, _logger, clean:_clean);
i++;
// If we are in inplace mode or redirecting output, save the DAT data
diff --git a/SabreHelper/Data/Build.cs b/SabreHelper/Data/Build.cs
index c217978c..caeb92cb 100644
--- a/SabreHelper/Data/Build.cs
+++ b/SabreHelper/Data/Build.cs
@@ -124,6 +124,7 @@ Options:
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-o, --old Output DAT in CMP format instead of XML
+ -clean Clean game names according to WoD standards
-out= Output directory (overridden by --inplace)
-sd, --superdat Enable SuperDAT creation
-n=, --name= Set the internal name of the DAT