mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatTools] Rename RomManipulation to DatTools
This commit is contained in:
@@ -284,7 +284,7 @@ JOIN checksums
|
|||||||
{
|
{
|
||||||
foreach (string key in roms.Keys)
|
foreach (string key in roms.Keys)
|
||||||
{
|
{
|
||||||
roms[key] = RomManipulation.Merge(roms[key], _logger);
|
roms[key] = DatTools.Merge(roms[key], _logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// END COMMENT
|
// END COMMENT
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ namespace SabreTools
|
|||||||
{
|
{
|
||||||
Int32.TryParse(sourcemap[hash], out tempSrcId);
|
Int32.TryParse(sourcemap[hash], out tempSrcId);
|
||||||
}
|
}
|
||||||
datdata = RomManipulation.Parse(file, 0, tempSrcId, datdata, _logger);
|
datdata = DatTools.Parse(file, 0, tempSrcId, datdata, _logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the dictionary is empty for any reason, tell the user and exit
|
// If the dictionary is empty for any reason, tell the user and exit
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ namespace SabreTools
|
|||||||
|
|
||||||
// Get all roms that are found in the DAT to see what needs to be added
|
// Get all roms that are found in the DAT to see what needs to be added
|
||||||
DatData datdata = new DatData();
|
DatData datdata = new DatData();
|
||||||
datdata = RomManipulation.Parse(_filepath, sysid, srcid, datdata, _logger);
|
datdata = DatTools.Parse(_filepath, sysid, srcid, datdata, _logger);
|
||||||
|
|
||||||
// Sort inputted roms into games
|
// Sort inputted roms into games
|
||||||
SortedDictionary<string, List<RomData>> sortable = new SortedDictionary<string, List<RomData>>();
|
SortedDictionary<string, List<RomData>> sortable = new SortedDictionary<string, List<RomData>>();
|
||||||
@@ -378,7 +378,7 @@ namespace SabreTools
|
|||||||
List<RomData> newroms = roms;
|
List<RomData> newroms = roms;
|
||||||
if (datdata.MergeRoms)
|
if (datdata.MergeRoms)
|
||||||
{
|
{
|
||||||
newroms = RomManipulation.Merge(newroms, _logger);
|
newroms = DatTools.Merge(newroms, _logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (RomData rom in newroms)
|
foreach (RomData rom in newroms)
|
||||||
@@ -402,7 +402,7 @@ namespace SabreTools
|
|||||||
foreach (string key in sortable.Keys)
|
foreach (string key in sortable.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> roms = sortable[key];
|
List<RomData> roms = sortable[key];
|
||||||
RomManipulation.Sort(roms, true);
|
DatTools.Sort(roms, true);
|
||||||
|
|
||||||
long gameid = -1;
|
long gameid = -1;
|
||||||
using (SqliteConnection dbc = new SqliteConnection(_connectionString))
|
using (SqliteConnection dbc = new SqliteConnection(_connectionString))
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace SabreTools
|
|||||||
foreach (string input in _inputs)
|
foreach (string input in _inputs)
|
||||||
{
|
{
|
||||||
_logger.User("Adding DAT: " + input.Split('¬')[0]);
|
_logger.User("Adding DAT: " + input.Split('¬')[0]);
|
||||||
userData = RomManipulation.Parse(input.Split('¬')[0], i, 0, userData, _logger, true, _clean);
|
userData = DatTools.Parse(input.Split('¬')[0], i, 0, userData, _logger, true, _clean);
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
// If we are in inplace mode or redirecting output, save the DAT data
|
// If we are in inplace mode or redirecting output, save the DAT data
|
||||||
@@ -231,7 +231,7 @@ namespace SabreTools
|
|||||||
foreach (string key in userData.Roms.Keys)
|
foreach (string key in userData.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> temp = userData.Roms[key];
|
List<RomData> temp = userData.Roms[key];
|
||||||
temp = RomManipulation.Merge(temp, _logger);
|
temp = DatTools.Merge(temp, _logger);
|
||||||
|
|
||||||
foreach (RomData rom in temp)
|
foreach (RomData rom in temp)
|
||||||
{
|
{
|
||||||
@@ -319,7 +319,7 @@ namespace SabreTools
|
|||||||
foreach (string key in userData.Roms.Keys)
|
foreach (string key in userData.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> temp = userData.Roms[key];
|
List<RomData> temp = userData.Roms[key];
|
||||||
temp = RomManipulation.Merge(temp, _logger);
|
temp = DatTools.Merge(temp, _logger);
|
||||||
|
|
||||||
foreach (RomData rom in temp)
|
foreach (RomData rom in temp)
|
||||||
{
|
{
|
||||||
@@ -387,7 +387,7 @@ namespace SabreTools
|
|||||||
List<string> keys = userData.Roms.Keys.ToList();
|
List<string> keys = userData.Roms.Keys.ToList();
|
||||||
foreach (string key in keys)
|
foreach (string key in keys)
|
||||||
{
|
{
|
||||||
List<RomData> oldroms = RomManipulation.Merge(userData.Roms[key], _logger);
|
List<RomData> oldroms = DatTools.Merge(userData.Roms[key], _logger);
|
||||||
List<RomData> newroms = new List<RomData>();
|
List<RomData> newroms = new List<RomData>();
|
||||||
|
|
||||||
foreach (RomData rom in oldroms)
|
foreach (RomData rom in oldroms)
|
||||||
|
|||||||
@@ -259,31 +259,31 @@ namespace SabreTools
|
|||||||
if (outputCMP)
|
if (outputCMP)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.ClrMamePro;
|
userInputDat.OutputFormat = OutputFormat.ClrMamePro;
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
if (outputMiss || romba)
|
if (outputMiss || romba)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.MissFile;
|
userInputDat.OutputFormat = OutputFormat.MissFile;
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
if (outputRC)
|
if (outputRC)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.RomCenter;
|
userInputDat.OutputFormat = OutputFormat.RomCenter;
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
if (outputSD)
|
if (outputSD)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.SabreDat;
|
userInputDat.OutputFormat = OutputFormat.SabreDat;
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
if (outputXML)
|
if (outputXML)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.Xml;
|
userInputDat.OutputFormat = OutputFormat.Xml;
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
if (!outputCMP && !(outputMiss || romba) && !outputRC && !outputSD && !outputXML)
|
if (!outputCMP && !(outputMiss || romba) && !outputRC && !outputSD && !outputXML)
|
||||||
{
|
{
|
||||||
RomManipulation.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
DatTools.Update(input, userInputDat, outdir, clean, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, _logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -576,7 +576,7 @@ namespace SabreTools
|
|||||||
OutputFormat = outputFormat,
|
OutputFormat = outputFormat,
|
||||||
MergeRoms = false,
|
MergeRoms = false,
|
||||||
};
|
};
|
||||||
datdata = RomManipulation.Parse(filename, 0, 0, datdata, _logger, true, clean);
|
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger, true, clean);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
string extension = (datdata.OutputFormat == OutputFormat.Xml || datdata.OutputFormat == OutputFormat.SabreDat ? ".xml" : ".dat");
|
string extension = (datdata.OutputFormat == OutputFormat.Xml || datdata.OutputFormat == OutputFormat.SabreDat ? ".xml" : ".dat");
|
||||||
@@ -599,7 +599,7 @@ namespace SabreTools
|
|||||||
OutputFormat = outputFormat,
|
OutputFormat = outputFormat,
|
||||||
MergeRoms = false,
|
MergeRoms = false,
|
||||||
};
|
};
|
||||||
datdata = RomManipulation.Parse(file, 0, 0, datdata, _logger, true, clean);
|
datdata = DatTools.Parse(file, 0, 0, datdata, _logger, true, clean);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
string extension = (datdata.OutputFormat == OutputFormat.Xml || datdata.OutputFormat == OutputFormat.SabreDat ? ".xml" : ".dat");
|
string extension = (datdata.OutputFormat == OutputFormat.Xml || datdata.OutputFormat == OutputFormat.SabreDat ? ".xml" : ".dat");
|
||||||
@@ -661,7 +661,7 @@ namespace SabreTools
|
|||||||
Romba = romba,
|
Romba = romba,
|
||||||
TSV = tsv,
|
TSV = tsv,
|
||||||
};
|
};
|
||||||
datdata = RomManipulation.Parse(input, 0, 0, datdata, _logger);
|
datdata = DatTools.Parse(input, 0, 0, datdata, _logger);
|
||||||
datdata.FileName += "-miss";
|
datdata.FileName += "-miss";
|
||||||
datdata.Name += "-miss";
|
datdata.Name += "-miss";
|
||||||
datdata.Description += "-miss";
|
datdata.Description += "-miss";
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ namespace SabreTools
|
|||||||
basepath = (basepath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? basepath : basepath + Path.DirectorySeparatorChar);
|
basepath = (basepath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? basepath : basepath + Path.DirectorySeparatorChar);
|
||||||
|
|
||||||
// Get the file data to be split
|
// Get the file data to be split
|
||||||
OutputFormat outputFormat = RomManipulation.GetOutputFormat(filename);
|
OutputFormat outputFormat = DatTools.GetOutputFormat(filename);
|
||||||
DatData datdata = new DatData();
|
DatData datdata = new DatData();
|
||||||
datdata = RomManipulation.Parse(filename, 0, 0, datdata, _logger, true);
|
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger, true);
|
||||||
|
|
||||||
// Create each of the respective output DATs
|
// Create each of the respective output DATs
|
||||||
_logger.User("Creating and populating new DATs");
|
_logger.User("Creating and populating new DATs");
|
||||||
@@ -343,10 +343,10 @@ namespace SabreTools
|
|||||||
{
|
{
|
||||||
// Load the current DAT to be processed
|
// Load the current DAT to be processed
|
||||||
DatData datdata = new DatData();
|
DatData datdata = new DatData();
|
||||||
datdata = RomManipulation.Parse(filename, 0, 0, datdata, _logger);
|
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger);
|
||||||
|
|
||||||
// Set all of the appropriate outputs for each of the subsets
|
// Set all of the appropriate outputs for each of the subsets
|
||||||
OutputFormat outputFormat = RomManipulation.GetOutputFormat(filename);
|
OutputFormat outputFormat = DatTools.GetOutputFormat(filename);
|
||||||
DatData datdataA = new DatData
|
DatData datdataA = new DatData
|
||||||
{
|
{
|
||||||
FileName = datdata.FileName + " (" + String.Join(",", _extA) + ")",
|
FileName = datdata.FileName + " (" + String.Join(",", _extA) + ")",
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ namespace SabreTools
|
|||||||
DatData datdata = new DatData
|
DatData datdata = new DatData
|
||||||
{
|
{
|
||||||
ForcePacking = (_forceunpack ? ForcePacking.Unzip : ForcePacking.None),
|
ForcePacking = (_forceunpack ? ForcePacking.Unzip : ForcePacking.None),
|
||||||
OutputFormat = RomManipulation.GetOutputFormat(filename),
|
OutputFormat = DatTools.GetOutputFormat(filename),
|
||||||
};
|
};
|
||||||
datdata = RomManipulation.Parse(filename, 0, 0, datdata, _logger);
|
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger);
|
||||||
|
|
||||||
// Trim all file names according to the path that's set
|
// Trim all file names according to the path that's set
|
||||||
List<string> keys = datdata.Roms.Keys.ToList();
|
List<string> keys = datdata.Roms.Keys.ToList();
|
||||||
|
|||||||
@@ -148,15 +148,15 @@ namespace SabreTools
|
|||||||
// First get the combination Dictionary of currentAllMerged and currentNewMerged
|
// First get the combination Dictionary of currentAllMerged and currentNewMerged
|
||||||
_logger.User("Adding Current and New Merged DATs to the dictionary");
|
_logger.User("Adding Current and New Merged DATs to the dictionary");
|
||||||
DatData completeDats = new DatData();
|
DatData completeDats = new DatData();
|
||||||
completeDats = RomManipulation.Parse(_currentAllMerged, 0, 0, completeDats, _logger);
|
completeDats = DatTools.Parse(_currentAllMerged, 0, 0, completeDats, _logger);
|
||||||
completeDats = RomManipulation.Parse(_currentNewMerged, 0, 0, completeDats, _logger);
|
completeDats = DatTools.Parse(_currentNewMerged, 0, 0, completeDats, _logger);
|
||||||
|
|
||||||
// Now get Net New output dictionary [(currentNewMerged)-(currentAllMerged)]
|
// Now get Net New output dictionary [(currentNewMerged)-(currentAllMerged)]
|
||||||
_logger.User("Creating and populating Net New dictionary");
|
_logger.User("Creating and populating Net New dictionary");
|
||||||
Dictionary<string, List<RomData>> netNew = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> netNew = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in completeDats.Roms.Keys)
|
foreach (string key in completeDats.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(completeDats.Roms[key], _logger);
|
List<RomData> templist = DatTools.Merge(completeDats.Roms[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
||||||
@@ -180,7 +180,7 @@ namespace SabreTools
|
|||||||
Dictionary<string, List<RomData>> unneeded = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> unneeded = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in completeDats.Roms.Keys)
|
foreach (string key in completeDats.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(completeDats.Roms[key], _logger);
|
List<RomData> templist = DatTools.Merge(completeDats.Roms[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentAllMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentAllMerged)
|
||||||
@@ -202,7 +202,7 @@ namespace SabreTools
|
|||||||
// Now create the New Missing dictionary [(Net New)+(currentMissingMerged-(Unneeded))]
|
// Now create the New Missing dictionary [(Net New)+(currentMissingMerged-(Unneeded))]
|
||||||
_logger.User("Creating and populating New Missing dictionary");
|
_logger.User("Creating and populating New Missing dictionary");
|
||||||
DatData midMissing = new DatData();
|
DatData midMissing = new DatData();
|
||||||
midMissing = RomManipulation.Parse(_currentMissingMerged, 0, 0, midMissing, _logger);
|
midMissing = DatTools.Parse(_currentMissingMerged, 0, 0, midMissing, _logger);
|
||||||
foreach (string key in unneeded.Keys)
|
foreach (string key in unneeded.Keys)
|
||||||
{
|
{
|
||||||
if (midMissing.Roms.ContainsKey(key))
|
if (midMissing.Roms.ContainsKey(key))
|
||||||
@@ -217,7 +217,7 @@ namespace SabreTools
|
|||||||
Dictionary<string, List<RomData>> newMissing = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> newMissing = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in midMissing.Roms.Keys)
|
foreach (string key in midMissing.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(midMissing.Roms[key], _logger);
|
List<RomData> templist = DatTools.Merge(midMissing.Roms[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentMissingMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentMissingMerged)
|
||||||
@@ -289,7 +289,7 @@ namespace SabreTools
|
|||||||
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in midHave.Keys)
|
foreach (string key in midHave.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(midHave[key], _logger);
|
List<RomData> templist = DatTools.Merge(midHave[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
||||||
@@ -452,12 +452,12 @@ namespace SabreTools
|
|||||||
// Now create the Have dictionary [(currentAllMerged)-(currentMissingMerged)]
|
// Now create the Have dictionary [(currentAllMerged)-(currentMissingMerged)]
|
||||||
_logger.User("Creating and populating Have dictionary");
|
_logger.User("Creating and populating Have dictionary");
|
||||||
DatData midHave = new DatData();
|
DatData midHave = new DatData();
|
||||||
midHave = RomManipulation.Parse(_currentMissingMerged, 0, 0, midHave, _logger);
|
midHave = DatTools.Parse(_currentMissingMerged, 0, 0, midHave, _logger);
|
||||||
midHave = RomManipulation.Parse(_currentAllMerged, 0, 0, midHave, _logger);
|
midHave = DatTools.Parse(_currentAllMerged, 0, 0, midHave, _logger);
|
||||||
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in midHave.Roms.Keys)
|
foreach (string key in midHave.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(midHave.Roms[key], _logger);
|
List<RomData> templist = DatTools.Merge(midHave.Roms[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentAllMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentAllMerged)
|
||||||
@@ -522,12 +522,12 @@ namespace SabreTools
|
|||||||
// Now create the Have dictionary [(currentNewMerged)-(currentMissingMerged)]
|
// Now create the Have dictionary [(currentNewMerged)-(currentMissingMerged)]
|
||||||
_logger.User("Creating and populating Have dictionary");
|
_logger.User("Creating and populating Have dictionary");
|
||||||
DatData midHave = new DatData();
|
DatData midHave = new DatData();
|
||||||
midHave = RomManipulation.Parse(_currentMissingMerged, 0, 0, midHave, _logger);
|
midHave = DatTools.Parse(_currentMissingMerged, 0, 0, midHave, _logger);
|
||||||
midHave = RomManipulation.Parse(_currentNewMerged, 0, 0, midHave, _logger);
|
midHave = DatTools.Parse(_currentNewMerged, 0, 0, midHave, _logger);
|
||||||
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
Dictionary<string, List<RomData>> have = new Dictionary<string, List<RomData>>();
|
||||||
foreach (string key in midHave.Roms.Keys)
|
foreach (string key in midHave.Roms.Keys)
|
||||||
{
|
{
|
||||||
List<RomData> templist = RomManipulation.Merge(midHave.Roms[key], _logger);
|
List<RomData> templist = DatTools.Merge(midHave.Roms[key], _logger);
|
||||||
foreach (RomData rom in templist)
|
foreach (RomData rom in templist)
|
||||||
{
|
{
|
||||||
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
if (rom.Dupe == DupeType.None && rom.System == _currentNewMerged)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace SabreTools.Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bucket roms by game name and optionally dedupe
|
// Bucket roms by game name and optionally dedupe
|
||||||
SortedDictionary<string, List<RomData>> sortable = RomManipulation.BucketByGame(datdata.Roms, datdata.MergeRoms, norename, logger);
|
SortedDictionary<string, List<RomData>> sortable = DatTools.BucketByGame(datdata.Roms, datdata.MergeRoms, norename, logger);
|
||||||
|
|
||||||
// Now write out to file
|
// Now write out to file
|
||||||
// If it's empty, use the current folder
|
// If it's empty, use the current folder
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System.Xml;
|
|||||||
|
|
||||||
namespace SabreTools.Helper
|
namespace SabreTools.Helper
|
||||||
{
|
{
|
||||||
public class RomManipulation
|
public class DatTools
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get what type of DAT the input file is
|
/// Get what type of DAT the input file is
|
||||||
@@ -1720,7 +1720,7 @@ namespace SabreTools.Helper
|
|||||||
if (File.Exists(inputFileName))
|
if (File.Exists(inputFileName))
|
||||||
{
|
{
|
||||||
logger.User("Processing \"" + Path.GetFileName(inputFileName) + "\"");
|
logger.User("Processing \"" + Path.GetFileName(inputFileName) + "\"");
|
||||||
datdata = RomManipulation.Parse(inputFileName, 0, 0, datdata, logger, true, clean);
|
datdata = DatTools.Parse(inputFileName, 0, 0, datdata, logger, true, clean);
|
||||||
datdata = Filter(datdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
datdata = Filter(datdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
@@ -1741,7 +1741,7 @@ namespace SabreTools.Helper
|
|||||||
logger.User("Processing \"" + Path.GetFullPath(file).Remove(0, inputFileName.Length) + "\"");
|
logger.User("Processing \"" + Path.GetFullPath(file).Remove(0, inputFileName.Length) + "\"");
|
||||||
DatData innerDatdata = (DatData)datdata.Clone();
|
DatData innerDatdata = (DatData)datdata.Clone();
|
||||||
innerDatdata.Roms = null;
|
innerDatdata.Roms = null;
|
||||||
innerDatdata = RomManipulation.Parse(file, 0, 0, innerDatdata, logger, true, clean);
|
innerDatdata = DatTools.Parse(file, 0, 0, innerDatdata, logger, true, clean);
|
||||||
innerDatdata = Filter(innerDatdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
innerDatdata = Filter(innerDatdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ namespace SabreTools
|
|||||||
_logger.User("Beginning stat collection for '" + filename + "'");
|
_logger.User("Beginning stat collection for '" + filename + "'");
|
||||||
List<String> games = new List<String>();
|
List<String> games = new List<String>();
|
||||||
DatData datdata = new DatData();
|
DatData datdata = new DatData();
|
||||||
datdata = RomManipulation.Parse(filename, 0, 0, datdata, _logger);
|
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger);
|
||||||
SortedDictionary<string, List<RomData>> newroms = RomManipulation.BucketByGame(datdata.Roms, false, true, _logger);
|
SortedDictionary<string, List<RomData>> newroms = DatTools.BucketByGame(datdata.Roms, false, true, _logger);
|
||||||
|
|
||||||
// Output single DAT stats (if asked)
|
// Output single DAT stats (if asked)
|
||||||
if (_single)
|
if (_single)
|
||||||
@@ -132,7 +132,7 @@ Please check the log folder if the stats scrolled offscreen");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SortedDictionary<string, List<RomData>> newroms = RomManipulation.BucketByGame(datdata.Roms, false, true, logger);
|
SortedDictionary<string, List<RomData>> newroms = DatTools.BucketByGame(datdata.Roms, false, true, logger);
|
||||||
logger.User(@" Uncompressed size: " + Style.GetBytesReadable(datdata.TotalSize) + @"
|
logger.User(@" Uncompressed size: " + Style.GetBytesReadable(datdata.TotalSize) + @"
|
||||||
Games found: " + newroms.Count + @"
|
Games found: " + newroms.Count + @"
|
||||||
Roms found: " + datdata.RomCount + @"
|
Roms found: " + datdata.RomCount + @"
|
||||||
|
|||||||
Reference in New Issue
Block a user