mirror of
https://github.com/SabreTools/SabreTools.Printing.git
synced 2026-02-04 05:36:09 +00:00
49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
using System.Text;
|
|
|
|
namespace SabreTools.Printing
|
|
{
|
|
public static class IRD
|
|
{
|
|
public static void Print(StringBuilder builder, Models.IRD.File ird)
|
|
{
|
|
builder.AppendLine("IRD Information:");
|
|
builder.AppendLine("-------------------------");
|
|
builder.AppendLine(ird.Magic, "Magic", Encoding.ASCII);
|
|
builder.AppendLine(ird.Version, "Version");
|
|
builder.AppendLine(ird.TitleID, "Title ID");
|
|
builder.AppendLine(ird.TitleLength, "Title length");
|
|
builder.AppendLine(ird.Title, "Title");
|
|
builder.AppendLine(ird.SystemVersion, "System version");
|
|
builder.AppendLine(ird.GameVersion, "Game version");
|
|
builder.AppendLine(ird.AppVersion, "App version");
|
|
builder.AppendLine(ird.HeaderLength, "Header length");
|
|
builder.AppendLine(ird.Header, "Header");
|
|
builder.AppendLine(ird.FooterLength, "Footer length");
|
|
builder.AppendLine(ird.Footer, "Footer");
|
|
builder.AppendLine(ird.RegionCount, "Region count");
|
|
if (ird.RegionCount != 0 && ird.RegionHashes != null && ird.RegionHashes.Length != 0)
|
|
{
|
|
for (int i = 0; i < ird.RegionCount; i++)
|
|
{
|
|
builder.AppendLine(ird.RegionHashes[i], $"Region {i} hash");
|
|
}
|
|
}
|
|
builder.AppendLine(ird.FileCount, "File count");
|
|
for (int i = 0; i < ird.FileCount; i++)
|
|
{
|
|
if (ird.FileKeys != null)
|
|
builder.AppendLine(ird.FileKeys[i], $"File {i} key");
|
|
if (ird.FileHashes != null)
|
|
builder.AppendLine(ird.FileHashes[i], $"File {i} hash");
|
|
}
|
|
builder.AppendLine(ird.ExtraConfig, "Extra config");
|
|
builder.AppendLine(ird.Attachments, "Attachments");
|
|
builder.AppendLine(ird.Data1Key, "Data 1 key");
|
|
builder.AppendLine(ird.Data2Key, "Data 2 key");
|
|
builder.AppendLine(ird.PIC, "PIC");
|
|
builder.AppendLine(ird.UID, "UID");
|
|
builder.AppendLine(ird.CRC, "CRC");
|
|
builder.AppendLine();
|
|
}
|
|
}
|
|
} |