mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Structs] Rename File to Rom again
I'm reverting this because there might be cases where System.IO.File and SabreTools.Helper.File could be in conflict
This commit is contained in:
@@ -32,7 +32,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
|
||||
// Bucket roms by game name and optionally dedupe
|
||||
SortedDictionary<string, List<File>> sortable = DatTools.BucketByGame(datdata.Files, datdata.MergeRoms, norename, logger);
|
||||
SortedDictionary<string, List<Rom>> sortable = DatTools.BucketByGame(datdata.Files, datdata.MergeRoms, norename, logger);
|
||||
|
||||
// Now write out to file
|
||||
// If it's empty, use the current folder
|
||||
@@ -95,11 +95,11 @@ namespace SabreTools.Helper
|
||||
int depth = 2, last = -1;
|
||||
string lastgame = null;
|
||||
List<string> splitpath = new List<string>();
|
||||
foreach (List<File> roms in sortable.Values)
|
||||
foreach (List<Rom> roms in sortable.Values)
|
||||
{
|
||||
for (int index = 0; index < roms.Count; index++)
|
||||
{
|
||||
File rom = roms[index];
|
||||
Rom rom = roms[index];
|
||||
List<string> newsplit = rom.Machine.Name.Split('\\').ToList();
|
||||
|
||||
// If we have a different game and we're not at the start of the list, output the end of last item
|
||||
@@ -285,7 +285,7 @@ namespace SabreTools.Helper
|
||||
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>The new depth of the tag</returns>
|
||||
public static int WriteStartGame(StreamWriter sw, File rom, List<string> newsplit, string lastgame, Dat datdata, int depth, int last, Logger logger)
|
||||
public static int WriteStartGame(StreamWriter sw, Rom rom, List<string> newsplit, string lastgame, Dat datdata, int depth, int last, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -344,7 +344,7 @@ namespace SabreTools.Helper
|
||||
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>The new depth of the tag</returns>
|
||||
public static int WriteEndGame(StreamWriter sw, File rom, List<string> splitpath, List<string> newsplit, string lastgame, Dat datdata, int depth, out int last, Logger logger)
|
||||
public static int WriteEndGame(StreamWriter sw, Rom rom, List<string> splitpath, List<string> newsplit, string lastgame, Dat datdata, int depth, out int last, Logger logger)
|
||||
{
|
||||
last = 0;
|
||||
|
||||
@@ -413,7 +413,7 @@ namespace SabreTools.Helper
|
||||
/// <param name="depth">Current depth to output file at (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>True if the data was written, false on error</returns>
|
||||
public static bool WriteRomData(StreamWriter sw, File rom, string lastgame, Dat datdata, int depth, Logger logger)
|
||||
public static bool WriteRomData(StreamWriter sw, Rom rom, string lastgame, Dat datdata, int depth, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user