Create DB version of Against; add passthroughs

This commit is contained in:
Matt Nadareski
2025-02-24 09:20:46 -05:00
parent 2cd17cd711
commit 1bed35c933
19 changed files with 198 additions and 68 deletions

View File

@@ -176,8 +176,8 @@ namespace SabreTools.DatTools
#endif
{
// Get the machine and source index for this item
long machineIndex = datFile.ItemsDB.GetMachineForItem(item.Key).Key;
long sourceIndex = datFile.ItemsDB.GetSourceForItem(item.Key).Key;
long machineIndex = datFile.GetMachineForItemDB(item.Key).Key;
long sourceIndex = datFile.GetSourceForItemDB(item.Key).Key;
if (newExtA.Contains((item.Value.GetName() ?? string.Empty).GetNormalizedExtension()))
{
@@ -406,8 +406,8 @@ namespace SabreTools.DatTools
#endif
{
// Get the machine and source index for this item
long machineIndex = datFile.ItemsDB.GetMachineForItem(item.Key).Key;
long sourceIndex = datFile.ItemsDB.GetSourceForItem(item.Key).Key;
long machineIndex = datFile.GetMachineForItemDB(item.Key).Key;
long sourceIndex = datFile.GetSourceForItemDB(item.Key).Key;
// Only process Disk, Media, and Rom
switch (item.Value)
@@ -726,8 +726,8 @@ namespace SabreTools.DatTools
#endif
{
// Get the machine and source index for this item
long machineIndex = datFile.ItemsDB.GetMachineForItem(item.Key).Key;
long sourceIndex = datFile.ItemsDB.GetSourceForItem(item.Key).Key;
long machineIndex = datFile.GetMachineForItemDB(item.Key).Key;
long sourceIndex = datFile.GetSourceForItemDB(item.Key).Key;
// If the file is not a Rom, it automatically goes in the "lesser" dat
if (item.Value is not Rom rom)
@@ -978,8 +978,8 @@ namespace SabreTools.DatTools
#endif
{
// Get the machine and source index for this item
long machineIndex = datFile.ItemsDB.GetMachineForItem(item.Key).Key;
long sourceIndex = datFile.ItemsDB.GetSourceForItem(item.Key).Key;
long machineIndex = datFile.GetMachineForItemDB(item.Key).Key;
long sourceIndex = datFile.GetSourceForItemDB(item.Key).Key;
if (item.Value.GetStringFieldValue(Models.Metadata.DatItem.TypeKey).AsEnumValue<ItemType>() == itemType)
indexDat.AddItemDB(item.Value, machineRemapping[machineIndex], sourceRemapping[sourceIndex], statsOnly: false);