mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-04 05:36:12 +00:00
NCF model cleanup
This commit is contained in:
@@ -35,4 +35,4 @@ namespace SabreTools.Data.Models.NCF
|
||||
/// </summary>
|
||||
HL_NCF_FLAG_FILE = 0x00004000,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,71 +11,71 @@ namespace SabreTools.Data.Models.NCF
|
||||
/// <summary>
|
||||
/// Header data
|
||||
/// </summary>
|
||||
public Header? Header { get; set; }
|
||||
public Header Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory header data
|
||||
/// </summary>
|
||||
public DirectoryHeader? DirectoryHeader { get; set; }
|
||||
public DirectoryHeader DirectoryHeader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory entries data
|
||||
/// </summary>
|
||||
public DirectoryEntry[]? DirectoryEntries { get; set; }
|
||||
public DirectoryEntry[] DirectoryEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory names data
|
||||
/// </summary>
|
||||
public Dictionary<long, string?>? DirectoryNames { get; set; }
|
||||
public Dictionary<long, string?> DirectoryNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory info 1 entries data
|
||||
/// </summary>
|
||||
public DirectoryInfo1Entry[]? DirectoryInfo1Entries { get; set; }
|
||||
public DirectoryInfo1Entry[] DirectoryInfo1Entries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory info 2 entries data
|
||||
/// </summary>
|
||||
public DirectoryInfo2Entry[]? DirectoryInfo2Entries { get; set; }
|
||||
public DirectoryInfo2Entry[] DirectoryInfo2Entries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory copy entries data
|
||||
/// </summary>
|
||||
public DirectoryCopyEntry[]? DirectoryCopyEntries { get; set; }
|
||||
public DirectoryCopyEntry[] DirectoryCopyEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory local entries data
|
||||
/// </summary>
|
||||
public DirectoryLocalEntry[]? DirectoryLocalEntries { get; set; }
|
||||
public DirectoryLocalEntry[] DirectoryLocalEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown header data
|
||||
/// </summary>
|
||||
public UnknownHeader? UnknownHeader { get; set; }
|
||||
public UnknownHeader UnknownHeader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown entries data
|
||||
/// </summary>
|
||||
public UnknownEntry[]? UnknownEntries { get; set; }
|
||||
public UnknownEntry[] UnknownEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checksum header data
|
||||
/// </summary>
|
||||
public ChecksumHeader? ChecksumHeader { get; set; }
|
||||
public ChecksumHeader ChecksumHeader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checksum map header data
|
||||
/// </summary>
|
||||
public ChecksumMapHeader? ChecksumMapHeader { get; set; }
|
||||
public ChecksumMapHeader ChecksumMapHeader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checksum map entries data
|
||||
/// </summary>
|
||||
public ChecksumMapEntry[]? ChecksumMapEntries { get; set; }
|
||||
public ChecksumMapEntry[] ChecksumMapEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checksum entries data
|
||||
/// </summary>
|
||||
public ChecksumEntry[]? ChecksumEntries { get; set; }
|
||||
public ChecksumEntry[] ChecksumEntries { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,17 +40,10 @@ namespace SabreTools.Serialization.Wrappers
|
||||
Print(builder, Model.ChecksumEntries);
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, Header? header)
|
||||
private static void Print(StringBuilder builder, Header header)
|
||||
{
|
||||
builder.AppendLine(" Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Dummy0, " Dummy 0");
|
||||
builder.AppendLine(header.MajorVersion, " Major version");
|
||||
builder.AppendLine(header.MinorVersion, " Minor version");
|
||||
@@ -65,17 +58,10 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryHeader? header)
|
||||
private static void Print(StringBuilder builder, DirectoryHeader header)
|
||||
{
|
||||
builder.AppendLine(" Directory Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No directory header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Dummy0, " Dummy 0");
|
||||
builder.AppendLine(header.CacheID, " Cache ID");
|
||||
builder.AppendLine(header.LastVersionPlayed, " Last version played");
|
||||
@@ -93,11 +79,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryEntry[]? entries, Dictionary<long, string?>? entryNames)
|
||||
private static void Print(StringBuilder builder, DirectoryEntry[] entries, Dictionary<long, string?> entryNames)
|
||||
{
|
||||
builder.AppendLine(" Directory Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No directory entries");
|
||||
builder.AppendLine();
|
||||
@@ -122,11 +108,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryInfo1Entry[]? entries)
|
||||
private static void Print(StringBuilder builder, DirectoryInfo1Entry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Directory Info 1 Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No directory info 1 entries");
|
||||
builder.AppendLine();
|
||||
@@ -144,11 +130,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryInfo2Entry[]? entries)
|
||||
private static void Print(StringBuilder builder, DirectoryInfo2Entry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Directory Info 2 Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No directory info 2 entries");
|
||||
builder.AppendLine();
|
||||
@@ -166,11 +152,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryCopyEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, DirectoryCopyEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Directory Copy Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No directory copy entries");
|
||||
builder.AppendLine();
|
||||
@@ -188,11 +174,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, DirectoryLocalEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, DirectoryLocalEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Directory Local Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No directory local entries");
|
||||
builder.AppendLine();
|
||||
@@ -210,27 +196,20 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, UnknownHeader? header)
|
||||
private static void Print(StringBuilder builder, UnknownHeader header)
|
||||
{
|
||||
builder.AppendLine(" Unknown Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No unknown header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Dummy0, " Dummy 0");
|
||||
builder.AppendLine(header.Dummy1, " Dummy 1");
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, UnknownEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, UnknownEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Unknown Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No unknown entries");
|
||||
builder.AppendLine();
|
||||
@@ -248,33 +227,19 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ChecksumHeader? header)
|
||||
private static void Print(StringBuilder builder, ChecksumHeader header)
|
||||
{
|
||||
builder.AppendLine(" Checksum Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No checksum header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Dummy0, " Dummy 0");
|
||||
builder.AppendLine(header.ChecksumSize, " Checksum size");
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ChecksumMapHeader? header)
|
||||
private static void Print(StringBuilder builder, ChecksumMapHeader header)
|
||||
{
|
||||
builder.AppendLine(" Checksum Map Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No checksum map header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Dummy0, " Dummy 0");
|
||||
builder.AppendLine(header.Dummy1, " Dummy 1");
|
||||
builder.AppendLine(header.ItemCount, " Item count");
|
||||
@@ -282,11 +247,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ChecksumMapEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ChecksumMapEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Checksum Map Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No checksum map entries");
|
||||
builder.AppendLine();
|
||||
@@ -305,11 +270,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ChecksumEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ChecksumEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Checksum Entries Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No checksum entries");
|
||||
builder.AppendLine();
|
||||
|
||||
Reference in New Issue
Block a user