Fix printing, hook up to printer

This commit is contained in:
Matt Nadareski
2023-01-09 21:18:45 -08:00
parent ce8f73d30d
commit d69746f7ef
2 changed files with 21 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ namespace BurnOutSharp.Wrappers
Console.WriteLine($" Byte order: {ByteOrder}");
Console.WriteLine($" Sector shift: {SectorShift} [{(long)Math.Pow(2, SectorShift)}]");
Console.WriteLine($" Mini sector shift: {MiniSectorShift} [{(long)Math.Pow(2, MiniSectorShift)}]");
Console.WriteLine($" Reserved: {BitConverter.ToString(Reserved).Replace('-', ' ')}]");
Console.WriteLine($" Reserved: {BitConverter.ToString(Reserved).Replace('-', ' ')}");
Console.WriteLine($" Number of directory sectors: {NumberOfDirectorySectors}");
Console.WriteLine($" Number of FAT sectors: {NumberOfFATSectors}");
Console.WriteLine($" First directory sector location: {FirstDirectorySectorLocation}");
@@ -201,7 +201,7 @@ namespace BurnOutSharp.Wrappers
Console.WriteLine($" DIFAT:");
for (int i = 0; i < DIFAT.Length; i++)
{
Console.WriteLine($" DIFAT Entry {i}: {DIFAT[i]}");
Console.WriteLine($" DIFAT Entry {i}: {DIFAT[i]}");
}
Console.WriteLine();
}

View File

@@ -257,6 +257,25 @@ namespace Test
cabinet.Print();
}
// MSI -- TODO: Technically CFB
else if (ft == SupportedFileType.MSI)
{
// Build the CFB information
Console.WriteLine("Creating Compact File Binary deserializer");
Console.WriteLine();
var cfb = CFB.Create(stream);
if (cfb == null)
{
Console.WriteLine("Something went wrong parsing Compact File Binary");
Console.WriteLine();
return;
}
// Print the CFB to screen
cfb.Print();
}
// N3DS
else if (ft == SupportedFileType.N3DS)
{