Update packages

This commit is contained in:
Matt Nadareski
2024-04-23 22:03:01 -04:00
parent 047bbeedbc
commit f2d43b2f18
7 changed files with 23 additions and 21 deletions

View File

@@ -66,7 +66,7 @@ namespace SabreTools.Printing.Printers
builder.AppendLine();
}
private static void Print(StringBuilder builder, SectorNumber?[]? sectorNumbers, string name)
private static void Print(StringBuilder builder, SectorNumber[]? sectorNumbers, string name)
{
builder.AppendLine($" {name} Sectors Information:");
builder.AppendLine(" -------------------------");

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text;
using SabreTools.Models.GCF;
using SabreTools.Printing.Interfaces;
@@ -33,7 +34,7 @@ namespace SabreTools.Printing.Printers
// Directory and Directory Maps
Print(builder, file.DirectoryHeader);
Print(builder, file.DirectoryEntries);
Print(builder, file.DirectoryEntries, file.DirectoryNames);
// TODO: Should we print out the entire string table?
Print(builder, file.DirectoryInfo1Entries);
Print(builder, file.DirectoryInfo2Entries);
@@ -249,7 +250,7 @@ namespace SabreTools.Printing.Printers
builder.AppendLine();
}
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries, Dictionary<long, string?>? entryNames)
{
builder.AppendLine(" Directory Entries Information:");
builder.AppendLine(" -------------------------");
@@ -271,7 +272,7 @@ namespace SabreTools.Printing.Printers
}
builder.AppendLine(entry.NameOffset, " Name offset");
builder.AppendLine(entry.Name, " Name");
builder.AppendLine(entryNames![entry.NameOffset], " Name");
builder.AppendLine(entry.ItemSize, " Item size");
builder.AppendLine(entry.ChecksumIndex, " Checksum index");
builder.AppendLine($" Directory flags: {entry.DirectoryFlags} (0x{entry.DirectoryFlags:X})");

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text;
using SabreTools.Models.NCF;
using SabreTools.Printing.Interfaces;
@@ -21,7 +22,7 @@ namespace SabreTools.Printing.Printers
// Directory and Directory Maps
Print(builder, file.DirectoryHeader);
Print(builder, file.DirectoryEntries);
Print(builder, file.DirectoryEntries, file.DirectoryNames);
// TODO: Should we print out the entire string table?
Print(builder, file.DirectoryInfo1Entries);
Print(builder, file.DirectoryInfo2Entries);
@@ -90,7 +91,7 @@ namespace SabreTools.Printing.Printers
builder.AppendLine();
}
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries, Dictionary<long, string?>? entryNames)
{
builder.AppendLine(" Directory Entries Information:");
builder.AppendLine(" -------------------------");
@@ -112,7 +113,7 @@ namespace SabreTools.Printing.Printers
}
builder.AppendLine(entry.NameOffset, " Name offset");
builder.AppendLine(entry.Name, " Name");
builder.AppendLine(entryNames![entry.NameOffset], " Name");
builder.AppendLine(entry.ItemSize, " Item size");
builder.AppendLine(entry.ChecksumIndex, " Checksum index");
builder.AppendLine($" Directory flags: {entry.DirectoryFlags} (0x{entry.DirectoryFlags:X})");

View File

@@ -282,7 +282,7 @@ namespace SabreTools.Printing.Printers
builder.AppendLine();
}
private static void Print(StringBuilder builder, Dictionary<ushort, ImportedNameTableEntry?>? entries)
private static void Print(StringBuilder builder, Dictionary<ushort, ImportedNameTableEntry>? entries)
{
builder.AppendLine(" Imported-Name Table Information:");
builder.AppendLine(" -------------------------");

View File

@@ -1141,18 +1141,18 @@ namespace SabreTools.Printing.Printers
continue;
}
if (menuItem.NormalMenuText != null)
if (menuItem is NormalMenuItem normalMenuItem)
{
builder.AppendLine($"{padding} Resource info: {menuItem.NormalResInfo} (0x{menuItem.NormalResInfo:X})");
builder.AppendLine(menuItem.NormalMenuText, $"{padding} Menu text");
builder.AppendLine($"{padding} Resource info: {normalMenuItem.NormalResInfo} (0x{normalMenuItem.NormalResInfo:X})");
builder.AppendLine(normalMenuItem.NormalMenuText, $"{padding} Menu text");
}
else
else if (menuItem is PopupMenuItem popupMenuItem)
{
builder.AppendLine($"{padding} Item type: {menuItem.PopupItemType} (0x{menuItem.PopupItemType:X})");
builder.AppendLine($"{padding} State: {menuItem.PopupState} (0x{menuItem.PopupState:X})");
builder.AppendLine(menuItem.PopupID, $"{padding} ID");
builder.AppendLine($"{padding} Resource info: {menuItem.PopupResInfo} (0x{menuItem.PopupResInfo:X})");
builder.AppendLine(menuItem.PopupMenuText, $"{padding} Menu text");
builder.AppendLine($"{padding} Item type: {popupMenuItem.PopupItemType} (0x{popupMenuItem.PopupItemType:X})");
builder.AppendLine($"{padding} State: {popupMenuItem.PopupState} (0x{popupMenuItem.PopupState:X})");
builder.AppendLine(popupMenuItem.PopupID, $"{padding} ID");
builder.AppendLine($"{padding} Resource info: {popupMenuItem.PopupResInfo} (0x{popupMenuItem.PopupResInfo:X})");
builder.AppendLine(popupMenuItem.PopupMenuText, $"{padding} Menu text");
}
}
}

View File

@@ -27,9 +27,9 @@
<ItemGroup>
<PackageReference Include="SabreTools.ASN1" Version="1.3.1" />
<PackageReference Include="SabreTools.IO" Version="1.3.7" />
<PackageReference Include="SabreTools.Models" Version="1.4.2" />
<PackageReference Include="SabreTools.Serialization" Version="1.5.3" />
<PackageReference Include="SabreTools.IO" Version="1.4.0" />
<PackageReference Include="SabreTools.Models" Version="1.4.4" />
<PackageReference Include="SabreTools.Serialization" Version="1.5.4" />
</ItemGroup>
</Project>

View File

@@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SabreTools.IO" Version="1.3.7" />
<PackageReference Include="SabreTools.IO" Version="1.4.0" />
<PackageReference Include="SabreTools.Matching" Version="1.3.1" />
</ItemGroup>