[Structs] Rename TSV field to XSV

This commit is contained in:
Matt Nadareski
2016-08-29 13:54:53 -07:00
parent be89b8649e
commit 3f463a1cf5
4 changed files with 10 additions and 10 deletions

View File

@@ -164,7 +164,7 @@ namespace SabreTools.Helper
public string AddExt;
public bool GameName;
public bool Romba;
public bool? TSV; // true for tab-deliminated output, false for comma-deliminated output
public bool? XSV; // true for tab-deliminated output, false for comma-deliminated output
// Statistical data related to the DAT
public long RomCount;
@@ -207,7 +207,7 @@ namespace SabreTools.Helper
AddExt = this.AddExt,
GameName = this.GameName,
Romba = this.Romba,
TSV = this.TSV,
XSV = this.XSV,
RomCount = this.RomCount,
DiskCount = this.DiskCount,
TotalSize = this.TotalSize,
@@ -250,7 +250,7 @@ namespace SabreTools.Helper
AddExt = this.AddExt,
GameName = this.GameName,
Romba = this.Romba,
TSV = this.TSV,
XSV = this.XSV,
};
}
}

View File

@@ -1690,7 +1690,7 @@ namespace SabreTools.Helper
if (System.IO.File.Exists(inputFileName))
{
logger.User("Processing \"" + Path.GetFileName(inputFileName) + "\"");
datdata = Parse(inputFileName, 0, 0, datdata, logger, true, clean, softlist, keepext:(datdata.TSV != null));
datdata = Parse(inputFileName, 0, 0, datdata, logger, true, clean, softlist, keepext:(datdata.XSV != null));
datdata = Filter(datdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, logger);
// If the extension matches, append ".new" to the filename
@@ -1715,7 +1715,7 @@ namespace SabreTools.Helper
logger.User("Processing \"" + Path.GetFullPath(file).Remove(0, inputFileName.Length) + "\"");
Dat innerDatdata = (Dat)datdata.Clone();
innerDatdata.Files = null;
innerDatdata = Parse(file, 0, 0, innerDatdata, logger, true, clean, keepext:(datdata.TSV != null));
innerDatdata = Parse(file, 0, 0, innerDatdata, logger, true, clean, keepext:(datdata.XSV != null));
innerDatdata = Filter(innerDatdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, logger);
// If the extension matches, append ".new" to the filename

View File

@@ -193,12 +193,12 @@ namespace SabreTools.Helper
")\n";
break;
case OutputFormat.MissFile:
if (datdata.TSV == true)
if (datdata.XSV == true)
{
header = "\"File Name\"\t\"Internal Name\"\t\"Description\"\t\"Game Name\"\t\"Game Description\"\t\"Type\"\t\"" +
"Rom Name\"\t\"Disk Name\"\t\"Size\"\t\"CRC\"\t\"MD5\"\t\"SHA1\"\t\"Nodump\"\n";
}
else if (datdata.TSV == false)
else if (datdata.XSV == false)
{
header = "\"File Name\",\"Internal Name\",\"Description\",\"Game Name\",\"Game Description\",\"Type\",\"" +
"Rom Name\",\"Disk Name\",\"Size\",\"CRC\",\"MD5\",\"SHA1\",\"Nodump\"\n";
@@ -450,7 +450,7 @@ namespace SabreTools.Helper
}
}
// If we're in TSV mode, similarly the state is consistent
else if (datdata.TSV == true)
else if (datdata.XSV == true)
{
string inline = "\"" + datdata.FileName + "\"\t\"" + datdata.Name + "\"\t\"" + datdata.Description + "\"\t\"" + rom.Machine + "\"\t\"" + rom.Machine + "\"\t\"" +
rom.Type.ToString().ToLowerInvariant() + "\"\t\"" + (rom.Type == ItemType.Rom ? rom.Name : "") + "\"\t\"" + (rom.Type == ItemType.Disk ? rom.Name : "") + "\"\t\"" + rom.HashData.Size + "\"\t\"" +
@@ -458,7 +458,7 @@ namespace SabreTools.Helper
state += pre + inline + post + "\n";
}
// If we're in CSV mode, similarly the state is consistent
else if (datdata.TSV == false)
else if (datdata.XSV == false)
{
string inline = "\"" + datdata.FileName + "\",\"" + datdata.Name + "\",\"" + datdata.Description + "\",\"" + rom.Machine + "\",\"" + rom.Machine + "\",\"" +
rom.Type.ToString().ToLowerInvariant() + "\",\"" + (rom.Type == ItemType.Rom ? rom.Name : "") + "\",\"" + (rom.Type == ItemType.Disk ? rom.Name : "") + "\",\"" + rom.HashData.Size + "\",\"" +

View File

@@ -315,7 +315,7 @@ namespace SabreTools
AddExt = addext,
GameName = datprefix,
Romba = romba,
TSV = tsv,
XSV = tsv,
};
if (outputCMP)