[ALL] Overhaul to internal system

This massive change replaces the old "Rom" struct system with a new one that have different objects for each major item type. This required a lot of work and a lot of changes and has unfortunately been untested. But this is the first step in moving away from using structs. The next major step is converting Dat over to this as well.
This commit is contained in:
Matt Nadareski
2016-09-19 18:04:24 -07:00
parent f059b5389c
commit 902070c542
22 changed files with 1615 additions and 3017 deletions

View File

@@ -49,7 +49,7 @@ namespace SabreTools.Helper
List<String> games = new List<String>();
Dat datdata = new Dat();
DatTools.Parse(filename, 0, 0, ref datdata, _logger);
SortedDictionary<string, List<Rom>> newroms = DatTools.BucketByGame(datdata.Files, false, true, _logger, false);
SortedDictionary<string, List<DatItem>> newroms = DatTools.BucketByGame(datdata.Files, false, true, _logger, false);
// Output single DAT stats (if asked)
if (_single)
@@ -116,7 +116,7 @@ Please check the log folder if the stats scrolled offscreen");
datdata.NodumpCount = 0;
// Loop through and add
foreach (List<Rom> roms in datdata.Files.Values)
foreach (List<DatItem> roms in datdata.Files.Values)
{
foreach (Rom rom in roms)
{
@@ -131,7 +131,7 @@ Please check the log folder if the stats scrolled offscreen");
}
}
SortedDictionary<string, List<Rom>> newroms = DatTools.BucketByGame(datdata.Files, false, true, logger, false);
SortedDictionary<string, List<DatItem>> newroms = DatTools.BucketByGame(datdata.Files, false, true, logger, false);
if (datdata.TotalSize < 0)
{
datdata.TotalSize = Int64.MaxValue + datdata.TotalSize;