mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
adding name trimming feature in //// comments for future use
This commit is contained in:
@@ -125,11 +125,17 @@ namespace SabreTools.Helper
|
|||||||
// If we didn't find any items in the folder, make sure to add the blank rom
|
// If we didn't find any items in the folder, make sure to add the blank rom
|
||||||
if (empty)
|
if (empty)
|
||||||
{
|
{
|
||||||
|
string tempgame = String.Join("\\", parent);
|
||||||
|
|
||||||
|
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
|
||||||
|
////tempgame = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempgame).Groups[1].Value;
|
||||||
|
////tempgame = tempgame.TrimStart().TrimEnd();
|
||||||
|
|
||||||
RomData rom = new RomData
|
RomData rom = new RomData
|
||||||
{
|
{
|
||||||
Type = "rom",
|
Type = "rom",
|
||||||
Name = "null",
|
Name = "null",
|
||||||
Game = String.Join("\\", parent),
|
Game = tempgame,
|
||||||
Size = -1,
|
Size = -1,
|
||||||
CRC = "null",
|
CRC = "null",
|
||||||
MD5 = "null",
|
MD5 = "null",
|
||||||
@@ -509,6 +515,9 @@ namespace SabreTools.Helper
|
|||||||
logger.Warning("Incomplete entry for \"" + subreader.GetAttribute("name") + "\" will be output as nodump");
|
logger.Warning("Incomplete entry for \"" + subreader.GetAttribute("name") + "\" will be output as nodump");
|
||||||
nodump = true;
|
nodump = true;
|
||||||
}
|
}
|
||||||
|
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
|
||||||
|
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
|
||||||
|
////tempname = tempname.TrimStart().TrimEnd();
|
||||||
|
|
||||||
// Only add the rom if there's useful information in it
|
// Only add the rom if there's useful information in it
|
||||||
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
|
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
|
||||||
@@ -559,6 +568,10 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
tempname = (parent.Count > 0 ? String.Join("\\", parent) + Path.DirectorySeparatorChar : "") + tempname;
|
tempname = (parent.Count > 0 ? String.Join("\\", parent) + Path.DirectorySeparatorChar : "") + tempname;
|
||||||
|
|
||||||
|
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
|
||||||
|
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
|
||||||
|
////tempname = tempname.TrimEnd().TrimStart();
|
||||||
|
|
||||||
RomData rom = new RomData
|
RomData rom = new RomData
|
||||||
{
|
{
|
||||||
Type = "rom",
|
Type = "rom",
|
||||||
@@ -718,6 +731,10 @@ namespace SabreTools.Helper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
|
||||||
|
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
|
||||||
|
////tempname = tempname.TrimEnd().TrimStart();
|
||||||
|
|
||||||
// Only add the rom if there's useful information in it
|
// Only add the rom if there's useful information in it
|
||||||
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
|
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user