mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFiles/] Create blank games always
This commit is contained in:
@@ -652,19 +652,16 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If no items were found for this machine, add a Blank placeholder
|
// If no items were found for this machine, add a Blank placeholder
|
||||||
if (!containsItems)
|
if (!containsItems)
|
||||||
{
|
{
|
||||||
if (this.KeepEmptyGames)
|
Blank blank = new Blank()
|
||||||
{
|
{
|
||||||
Blank blank = new Blank()
|
SystemID = sysid,
|
||||||
{
|
System = filename,
|
||||||
SystemID = sysid,
|
SourceID = srcid,
|
||||||
System = filename,
|
};
|
||||||
SourceID = srcid,
|
blank.CopyMachineInformation(machine);
|
||||||
};
|
|
||||||
blank.CopyMachineInformation(machine);
|
|
||||||
|
|
||||||
// Now process and add the rom
|
// Now process and add the rom
|
||||||
ParseAddHelper(blank, clean, remUnicode);
|
ParseAddHelper(blank, clean, remUnicode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
RomOf = reader.GetAttribute("romof") ?? "",
|
RomOf = reader.GetAttribute("romof") ?? "",
|
||||||
SampleOf = reader.GetAttribute("sampleof") ?? "",
|
SampleOf = reader.GetAttribute("sampleof") ?? "",
|
||||||
Devices = new List<string>(),
|
Devices = new List<string>(),
|
||||||
|
SlotOptions = new List<string>(),
|
||||||
|
|
||||||
MachineType = (machineType == MachineType.NULL ? MachineType.None : machineType),
|
MachineType = (machineType == MachineType.NULL ? MachineType.None : machineType),
|
||||||
};
|
};
|
||||||
@@ -495,19 +496,16 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If no items were found for this machine, add a Blank placeholder
|
// If no items were found for this machine, add a Blank placeholder
|
||||||
if (!containsItems)
|
if (!containsItems)
|
||||||
{
|
{
|
||||||
if (this.KeepEmptyGames)
|
Blank blank = new Blank()
|
||||||
{
|
{
|
||||||
Blank blank = new Blank()
|
SystemID = sysid,
|
||||||
{
|
System = filename,
|
||||||
SystemID = sysid,
|
SourceID = srcid,
|
||||||
System = filename,
|
};
|
||||||
SourceID = srcid,
|
blank.CopyMachineInformation(machine);
|
||||||
};
|
|
||||||
blank.CopyMachineInformation(machine);
|
|
||||||
|
|
||||||
// Now process and add the rom
|
// Now process and add the rom
|
||||||
ParseAddHelper(blank, clean, remUnicode);
|
ParseAddHelper(blank, clean, remUnicode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,12 +537,12 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// Get the roms from the machine
|
// Get the roms from the machine
|
||||||
switch (reader.Name)
|
switch (reader.Name)
|
||||||
{
|
{
|
||||||
case "slotoption": // These get added as devices currently
|
case "slotoption":
|
||||||
// string slotoption_name = reader.GetAttribute("name");
|
// string slotoption_name = reader.GetAttribute("name");
|
||||||
string devname = reader.GetAttribute("devname");
|
string devname = reader.GetAttribute("devname");
|
||||||
if (!machine.Devices.Contains(devname))
|
if (!machine.SlotOptions.Contains(devname))
|
||||||
{
|
{
|
||||||
machine.Devices.Add(devname);
|
machine.SlotOptions.Add(devname);
|
||||||
}
|
}
|
||||||
// bool? slotoption_default = Utilities.GetYesNo(reader.GetAttribute("default"));
|
// bool? slotoption_default = Utilities.GetYesNo(reader.GetAttribute("default"));
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|||||||
@@ -537,19 +537,16 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If no items were found for this machine, add a Blank placeholder
|
// If no items were found for this machine, add a Blank placeholder
|
||||||
if (!containsItems)
|
if (!containsItems)
|
||||||
{
|
{
|
||||||
if (this.KeepEmptyGames)
|
Blank blank = new Blank()
|
||||||
{
|
{
|
||||||
Blank blank = new Blank()
|
SystemID = sysid,
|
||||||
{
|
System = filename,
|
||||||
SystemID = sysid,
|
SourceID = srcid,
|
||||||
System = filename,
|
};
|
||||||
SourceID = srcid,
|
blank.CopyMachineInformation(machine);
|
||||||
};
|
|
||||||
blank.CopyMachineInformation(machine);
|
|
||||||
|
|
||||||
// Now process and add the rom
|
// Now process and add the rom
|
||||||
ParseAddHelper(blank, clean, remUnicode);
|
ParseAddHelper(blank, clean, remUnicode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,19 +199,16 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If no items were found for this machine, add a Blank placeholder
|
// If no items were found for this machine, add a Blank placeholder
|
||||||
if (!containsItems)
|
if (!containsItems)
|
||||||
{
|
{
|
||||||
if (this.KeepEmptyGames)
|
Blank blank = new Blank()
|
||||||
{
|
{
|
||||||
Blank blank = new Blank()
|
SystemID = sysid,
|
||||||
{
|
System = filename,
|
||||||
SystemID = sysid,
|
SourceID = srcid,
|
||||||
System = filename,
|
};
|
||||||
SourceID = srcid,
|
blank.CopyMachineInformation(machine);
|
||||||
};
|
|
||||||
blank.CopyMachineInformation(machine);
|
|
||||||
|
|
||||||
// Now process and add the rom
|
// Now process and add the rom
|
||||||
ParseAddHelper(blank, clean, remUnicode);
|
ParseAddHelper(blank, clean, remUnicode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -462,14 +462,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// By default, create a new Blank, just in case
|
// By default, create a new Blank, just in case
|
||||||
if (this.KeepEmptyGames)
|
datItem = new Blank();
|
||||||
{
|
|
||||||
datItem = new Blank();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
datItem = null;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,19 +231,16 @@ namespace SabreTools.Library.DatFiles
|
|||||||
// If no items were found for this machine, add a Blank placeholder
|
// If no items were found for this machine, add a Blank placeholder
|
||||||
if (!containsItems)
|
if (!containsItems)
|
||||||
{
|
{
|
||||||
if (this.KeepEmptyGames)
|
Blank blank = new Blank()
|
||||||
{
|
{
|
||||||
Blank blank = new Blank()
|
SystemID = sysid,
|
||||||
{
|
System = filename,
|
||||||
SystemID = sysid,
|
SourceID = srcid,
|
||||||
System = filename,
|
};
|
||||||
SourceID = srcid,
|
blank.CopyMachineInformation(machine);
|
||||||
};
|
|
||||||
blank.CopyMachineInformation(machine);
|
|
||||||
|
|
||||||
// Now process and add the rom
|
// Now process and add the rom
|
||||||
ParseAddHelper(blank, clean, remUnicode);
|
ParseAddHelper(blank, clean, remUnicode);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user