mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SimpleSort] Add a new tool: SimpleSort
SimpleSort is essentially a quick rebuild solution for a fixdat or an input DAT. It can read all 4 major types of archive and always builds to zip
This commit is contained in:
@@ -1484,14 +1484,8 @@ namespace SabreTools.Helper
|
||||
{
|
||||
RomData lastrom = outroms[i];
|
||||
|
||||
// If last is a nodump, skip it
|
||||
if (lastrom.Nodump)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get the duplicate status
|
||||
dupefound = RomDuplicate(rom, lastrom);
|
||||
dupefound = IsDuplicate(rom, lastrom);
|
||||
|
||||
// If it's a duplicate, skip adding it to the output but add any missing information
|
||||
if (dupefound)
|
||||
@@ -1579,7 +1573,7 @@ namespace SabreTools.Helper
|
||||
/// <param name="lastrom">Rom to use as a base</param>
|
||||
/// <param name="datdata">DAT to match against</param>
|
||||
/// <returns>List of matched RomData objects</returns>
|
||||
public static List<RomData> ListDuplicates(RomData lastrom, DatData datdata)
|
||||
public static List<RomData> GetDuplicates(RomData lastrom, DatData datdata)
|
||||
{
|
||||
List<RomData> output = new List<RomData>();
|
||||
|
||||
@@ -1594,7 +1588,7 @@ namespace SabreTools.Helper
|
||||
{
|
||||
foreach (RomData rom in roms)
|
||||
{
|
||||
if (RomDuplicate(rom, lastrom))
|
||||
if (IsDuplicate(rom, lastrom))
|
||||
{
|
||||
output.Add(rom);
|
||||
}
|
||||
@@ -1610,10 +1604,16 @@ namespace SabreTools.Helper
|
||||
/// <param name="rom">Rom to check for duplicate status</param>
|
||||
/// <param name="lastrom">Rom to use as a baseline</param>
|
||||
/// <returns>True if the roms are duplicates, false otherwise</returns>
|
||||
public static bool RomDuplicate(RomData rom, RomData lastrom)
|
||||
public static bool IsDuplicate(RomData rom, RomData lastrom)
|
||||
{
|
||||
bool dupefound = false;
|
||||
|
||||
// If either is a nodump, it's never a match
|
||||
if (rom.Nodump || lastrom.Nodump)
|
||||
{
|
||||
return dupefound;
|
||||
}
|
||||
|
||||
if (rom.Type == "rom" && lastrom.Type == "rom")
|
||||
{
|
||||
dupefound = ((rom.Size == lastrom.Size) &&
|
||||
|
||||
Reference in New Issue
Block a user