mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Add DOSCenter output format to all that support
This commit is contained in:
@@ -112,6 +112,7 @@ namespace SabreTools.Helper
|
|||||||
helptext.Add(" -u, --unzip Force unzipping in created DAT");
|
helptext.Add(" -u, --unzip Force unzipping in created DAT");
|
||||||
helptext.Add(" -f, --files Treat archives as files");
|
helptext.Add(" -f, --files Treat archives as files");
|
||||||
helptext.Add(" -oc, --output-cmp Output in CMP format");
|
helptext.Add(" -oc, --output-cmp Output in CMP format");
|
||||||
|
helptext.Add(" -od, --output-dc Output in DOSCenter format");
|
||||||
helptext.Add(" -om, --output-miss Output in Missfile format");
|
helptext.Add(" -om, --output-miss Output in Missfile format");
|
||||||
helptext.Add(" -omd5, --output-md5 Output in MD5 format");
|
helptext.Add(" -omd5, --output-md5 Output in MD5 format");
|
||||||
helptext.Add(" -or, --output-rc Output in RomCenter format");
|
helptext.Add(" -or, --output-rc Output in RomCenter format");
|
||||||
@@ -147,6 +148,7 @@ namespace SabreTools.Helper
|
|||||||
helptext.Add(" -out= Output directory");
|
helptext.Add(" -out= Output directory");
|
||||||
helptext.Add(" -ud, --update Update a DAT file");
|
helptext.Add(" -ud, --update Update a DAT file");
|
||||||
helptext.Add(" -oc, --output-cmp Output in CMP format");
|
helptext.Add(" -oc, --output-cmp Output in CMP format");
|
||||||
|
helptext.Add(" -od, --output-dc Output in DOSCenter format");
|
||||||
helptext.Add(" -om, --output-miss Output in Missfile format");
|
helptext.Add(" -om, --output-miss Output in Missfile format");
|
||||||
helptext.Add(" -r, --roms Output roms to miss instead of sets");
|
helptext.Add(" -r, --roms Output roms to miss instead of sets");
|
||||||
helptext.Add(" -gp, --game-prefix Add game name as a prefix");
|
helptext.Add(" -gp, --game-prefix Add game name as a prefix");
|
||||||
|
|||||||
@@ -3094,6 +3094,17 @@ namespace SabreTools.Helper
|
|||||||
(datdata.ForceMerging == ForceMerging.Split ? "\tforcemerging split\n" : "") +
|
(datdata.ForceMerging == ForceMerging.Split ? "\tforcemerging split\n" : "") +
|
||||||
")\n";
|
")\n";
|
||||||
break;
|
break;
|
||||||
|
case OutputFormat.DOSCenter:
|
||||||
|
header = "DOSCenter (\n" +
|
||||||
|
"Name: " + datdata.Name + "\"\n" +
|
||||||
|
"Description: " + datdata.Description + "\"\n" +
|
||||||
|
"Version: " + datdata.Version + "\"\n" +
|
||||||
|
"Date: " + datdata.Date + "\"\n" +
|
||||||
|
"Author: " + datdata.Author + "\"\n" +
|
||||||
|
"Homepage: " + datdata.Homepage + "\"\n" +
|
||||||
|
"Comment: " + datdata.Comment + "\"\n" +
|
||||||
|
")\n";
|
||||||
|
break;
|
||||||
case OutputFormat.MissFile:
|
case OutputFormat.MissFile:
|
||||||
if (datdata.XSV == true)
|
if (datdata.XSV == true)
|
||||||
{
|
{
|
||||||
@@ -3225,7 +3236,9 @@ namespace SabreTools.Helper
|
|||||||
"\tdescription \"" + (String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription) + "\"\n" +
|
"\tdescription \"" + (String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription) + "\"\n" +
|
||||||
(String.IsNullOrEmpty(rom.Year) ? "" : "\tyear " + rom.Year + "\n") +
|
(String.IsNullOrEmpty(rom.Year) ? "" : "\tyear " + rom.Year + "\n") +
|
||||||
(String.IsNullOrEmpty(rom.Manufacturer) ? "" : "\tmanufacturer \"" + rom.Manufacturer + "\"\n");
|
(String.IsNullOrEmpty(rom.Manufacturer) ? "" : "\tmanufacturer \"" + rom.Manufacturer + "\"\n");
|
||||||
|
break;
|
||||||
|
case OutputFormat.DOSCenter:
|
||||||
|
state += "game (\n\tname \"" + rom.MachineName + ".zip\"\n";
|
||||||
break;
|
break;
|
||||||
case OutputFormat.SabreDat:
|
case OutputFormat.SabreDat:
|
||||||
for (int i = (last == -1 ? 0 : last); i < newsplit.Count; i++)
|
for (int i = (last == -1 ? 0 : last); i < newsplit.Count; i++)
|
||||||
@@ -3289,6 +3302,7 @@ namespace SabreTools.Helper
|
|||||||
switch (outputFormat)
|
switch (outputFormat)
|
||||||
{
|
{
|
||||||
case OutputFormat.ClrMamePro:
|
case OutputFormat.ClrMamePro:
|
||||||
|
case OutputFormat.DOSCenter:
|
||||||
state += (String.IsNullOrEmpty(rom.SampleOf) ? "" : "\tsampleof \"" + rom.SampleOf + "\"\n") + ")\n";
|
state += (String.IsNullOrEmpty(rom.SampleOf) ? "" : "\tsampleof \"" + rom.SampleOf + "\"\n") + ")\n";
|
||||||
break;
|
break;
|
||||||
case OutputFormat.SabreDat:
|
case OutputFormat.SabreDat:
|
||||||
@@ -3413,6 +3427,25 @@ namespace SabreTools.Helper
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case OutputFormat.DOSCenter:
|
||||||
|
switch (rom.Type)
|
||||||
|
{
|
||||||
|
case ItemType.Archive:
|
||||||
|
case ItemType.BiosSet:
|
||||||
|
case ItemType.Disk:
|
||||||
|
case ItemType.Release:
|
||||||
|
case ItemType.Sample:
|
||||||
|
// We don't output these at all
|
||||||
|
break;
|
||||||
|
case ItemType.Rom:
|
||||||
|
state += "\tfile ( name\"" + ((Rom)rom).Name
|
||||||
|
+ " size " + ((Rom)rom).Size
|
||||||
|
+ " date " + ((Rom)rom).Date
|
||||||
|
+ " crc " + ((Rom)rom).CRC
|
||||||
|
+ " )\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case OutputFormat.MissFile:
|
case OutputFormat.MissFile:
|
||||||
// Missfile should only output Rom and Disk
|
// Missfile should only output Rom and Disk
|
||||||
@@ -3751,6 +3784,7 @@ namespace SabreTools.Helper
|
|||||||
switch (outputFormat)
|
switch (outputFormat)
|
||||||
{
|
{
|
||||||
case OutputFormat.ClrMamePro:
|
case OutputFormat.ClrMamePro:
|
||||||
|
case OutputFormat.DOSCenter:
|
||||||
footer = ")\n";
|
footer = ")\n";
|
||||||
break;
|
break;
|
||||||
case OutputFormat.SabreDat:
|
case OutputFormat.SabreDat:
|
||||||
|
|||||||
@@ -163,7 +163,10 @@ Options:
|
|||||||
should be read as-is.
|
should be read as-is.
|
||||||
|
|
||||||
-oc, --output-cmp Output in CMP format
|
-oc, --output-cmp Output in CMP format
|
||||||
Add outputting the created DAT to clrmamepro format
|
Add outputting the created DAT to CLRMamePro format
|
||||||
|
|
||||||
|
-od, --output-dc Output in DOSCenter format
|
||||||
|
Add outputting the created DAT to DOSCenter format
|
||||||
|
|
||||||
-om, --output-miss Output in Missfile format
|
-om, --output-miss Output in Missfile format
|
||||||
Add outputting the created DAT to GoodTools miss format
|
Add outputting the created DAT to GoodTools miss format
|
||||||
@@ -334,6 +337,9 @@ Options:
|
|||||||
-oc, --output-cmp Output in CMP format
|
-oc, --output-cmp Output in CMP format
|
||||||
Add outputting the created DAT to clrmamepro format
|
Add outputting the created DAT to clrmamepro format
|
||||||
|
|
||||||
|
-od, --output-dc Output in DOSCenter format
|
||||||
|
Add outputting the created DAT to DOSCenter format
|
||||||
|
|
||||||
-om, --output-miss Output in Missfile format
|
-om, --output-miss Output in Missfile format
|
||||||
Add outputting the created DAT to GoodTools miss format
|
Add outputting the created DAT to GoodTools miss format
|
||||||
|
|
||||||
|
|||||||
@@ -236,6 +236,10 @@ namespace SabreTools
|
|||||||
case "--output-cmp":
|
case "--output-cmp":
|
||||||
outputFormat |= OutputFormat.ClrMamePro;
|
outputFormat |= OutputFormat.ClrMamePro;
|
||||||
break;
|
break;
|
||||||
|
case "-od":
|
||||||
|
case "--output-dc":
|
||||||
|
outputFormat |= OutputFormat.DOSCenter;
|
||||||
|
break;
|
||||||
case "-om":
|
case "-om":
|
||||||
case "--output-miss":
|
case "--output-miss":
|
||||||
outputFormat |= OutputFormat.MissFile;
|
outputFormat |= OutputFormat.MissFile;
|
||||||
|
|||||||
Reference in New Issue
Block a user