diff --git a/DATFromDir/DATFromDir.cs b/DATFromDir/DATFromDir.cs index 9a9a3d92..1548fcb1 100644 --- a/DATFromDir/DATFromDir.cs +++ b/DATFromDir/DATFromDir.cs @@ -29,7 +29,7 @@ namespace SabreTools // User specified flags private bool _noMD5; private bool _noSHA1; - private bool _noDate; + private bool _bare; private bool _forceunpack; private bool _archivesAsFiles; private bool _old; @@ -57,14 +57,14 @@ namespace SabreTools /// Author of the DAT /// True if MD5 hashes should be skipped over, false otherwise /// True if SHA-1 hashes should be skipped over, false otherwise - /// True if the date should be omitted from the DAT, false otherwise + /// True if the date should be omitted from the DAT, false otherwise /// True if the forcepacking="unzip" tag is to be added, false otherwise /// True if all archives should be treated like files, false otherwise /// True if a old-style DAT should be output, false otherwise /// True if SuperDAT mode is enabled, false otherwise /// Logger object for console and file output public DATFromDir(List inputs, string name, string desc, string cat, string version, string author, - bool noMD5, bool noSHA1, bool noDate, bool forceunpack, bool archivesAsFiles, bool old, bool superDat, Logger logger) + bool noMD5, bool noSHA1, bool bare, bool forceunpack, bool archivesAsFiles, bool old, bool superDat, Logger logger) { _inputs = inputs; _name = name; @@ -74,7 +74,7 @@ namespace SabreTools _author = author; _noMD5 = noMD5; _noSHA1 = noSHA1; - _noDate = noDate; + _bare = bare; _forceunpack = forceunpack; _archivesAsFiles = archivesAsFiles; _old = old; @@ -101,7 +101,7 @@ namespace SabreTools logger.Start(); // First things first, take care of all of the arguments that this could have - bool noMD5 = false, noSHA1 = false, forceunpack = false, archivesAsFiles = false, old = false, log = false, superDat = false, noDate = false; + bool noMD5 = false, noSHA1 = false, forceunpack = false, archivesAsFiles = false, old = false, log = false, superDat = false, bare = false; string name = "", desc = "", cat = "", version = "", author = ""; List inputs = new List(); foreach (string arg in args) @@ -124,7 +124,7 @@ namespace SabreTools break; case "-b": case "--bare": - noDate = true; + bare = true; break; case "-u": case "--unzip": @@ -202,7 +202,7 @@ namespace SabreTools } // Create a new DATFromDir object and process the inputs - DATFromDir dfd = new DATFromDir(inputs, name, desc, cat, version, author, noMD5, noSHA1, noDate, forceunpack, archivesAsFiles, old, superDat, logger); + DATFromDir dfd = new DATFromDir(inputs, name, desc, cat, version, author, noMD5, noSHA1, bare, forceunpack, archivesAsFiles, old, superDat, logger); bool success = dfd.Start(); // If we failed, show the help @@ -309,7 +309,7 @@ namespace SabreTools } } _name = (_name == "" ? "Default" : _name); - _desc = (_desc == "" ? _name + (_noDate ? "" : " (" + _date + ")") : _desc); + _desc = (_desc == "" ? _name + (_bare ? "" : " (" + _date + ")") : _desc); // Now write it all out as a DAT Output.WriteToDat(_name, _desc, _version, _date, _cat, _author, _forceunpack, _old, Environment.CurrentDirectory, _roms, _logger); diff --git a/DATabase/DATabase.cs b/DATabase/DATabase.cs index d9751571..496bc7b0 100644 --- a/DATabase/DATabase.cs +++ b/DATabase/DATabase.cs @@ -68,7 +68,6 @@ namespace SabreTools listsrc = false, listsys = false, merge = false, - noDate = false, norename = false, old = false, quotes = false, @@ -111,7 +110,7 @@ namespace SabreTools break; case "-b": case "--bare": - noDate = true; + bare = true; break; case "-cc": case "--convert-cmp": @@ -435,7 +434,7 @@ namespace SabreTools // Merge, diff, and dedupe at least 2 DATs else if (merge) { - InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, noDate, forceunpack, old); + InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old); } logger.Close(); @@ -854,7 +853,7 @@ Make a selection: private static void MergeDiffMenu() { string selection = "", input = "", name = "", desc = "", cat = "", version = "", author = ""; - bool dedup = false, diff = false, noDate = false, forceunpack = false, old = false; + bool dedup = false, diff = false, bare = false, forceunpack = false, old = false; while (selection.ToLowerInvariant() != "b") { Console.Clear(); @@ -871,7 +870,7 @@ Make a selection: 6) Author" + (author != "" ? ":\t" + author : "") + @" 7) " + (dedup ? "Don't dedup files in output" : "Dedup files in output") + @" 8) " + (diff ? "Only merge the input files" : "Diff the input files") + @" - 9) " + (noDate ? "Don't append the date to the name" : "Append the date to the name") + @" + 9) " + (bare ? "Don't append the date to the name" : "Append the date to the name") + @" 10) " + (forceunpack ? "Remove 'forcepacking=\"unzip\"' from output" : "Add 'forcepacking=\"unzip\"' to output") + @" 11) " + (old ? "Enable XML output" : "Enable ClrMamePro output") + @" 12) Merge the DATs @@ -918,7 +917,7 @@ Make a selection: diff = !diff; break; case "9": - noDate = !noDate; + bare = !bare; break; case "10": forceunpack = !forceunpack; @@ -929,7 +928,7 @@ Make a selection: case "12": Console.Clear(); List inputs = new List(input.Split(';')); - InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, noDate, forceunpack, old); + InitMergeDiff(inputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old); Console.Write("\nPress any key to continue..."); Console.ReadKey(); break; @@ -1354,10 +1353,10 @@ Make a selection: /// Author of the DAT /// True if a DiffDat of all inputs is wanted, false otherwise /// True if the outputted file should remove duplicates, false otherwise - /// True if the date should be omitted from the DAT, false otherwise + /// True if the date should be omitted from the DAT, false otherwise /// True if the forcepacking="unzip" tag is to be added, false otherwise /// True if a old-style DAT should be output, false otherwise - private static void InitMergeDiff(List inputs, string name, string desc, string cat, string version, string author, bool diff, bool dedup, bool noDate, bool forceunpack, bool old) + 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) { // Make sure there are no folders in inputs List newInputs = new List(); @@ -1376,7 +1375,7 @@ Make a selection: } } - MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, noDate, forceunpack, old, logger); + MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, logger); md.Process(); } diff --git a/DATabase/MergeDiff.cs b/DATabase/MergeDiff.cs index d2162112..a7f72e60 100644 --- a/DATabase/MergeDiff.cs +++ b/DATabase/MergeDiff.cs @@ -13,7 +13,7 @@ namespace SabreTools // User specified flags private bool _diff; private bool _dedup; - private bool _noDate; + private bool _bare; private bool _forceunpack; private bool _old; @@ -39,12 +39,12 @@ namespace SabreTools /// Author of the DAT /// True if a DiffDat of all inputs is wanted, false otherwise /// True if the outputted file should remove duplicates, false otherwise - /// True if the date should be omitted from the DAT, false otherwise + /// True if the date should be omitted from the DAT, false otherwise /// True if the forcepacking="unzip" tag is to be added, false otherwise /// True if a old-style DAT should be output, false otherwise /// 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 noDate, bool forceunpack, bool old, Logger logger) + bool diff, bool dedup, bool bare, bool forceunpack, bool old, Logger logger) { _inputs = inputs; _name = name; @@ -54,7 +54,7 @@ namespace SabreTools _author = author; _diff = diff; _dedup = dedup; - _noDate = noDate; + _bare = bare; _forceunpack = forceunpack; _old = old; _logger = logger; @@ -106,7 +106,7 @@ namespace SabreTools if (_desc == "") { _desc = (_diff ? "diffdat" : "mergedat") + (_dedup ? "-merged" : ""); - if (!_noDate) + if (!_bare) { _desc += " (" + _date + ")"; }