mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-09 02:16:46 +00:00
Hook up CIA to printer
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
/// </summary>
|
||||
BZip2,
|
||||
|
||||
/// <summary>
|
||||
/// CTR Importable Archive
|
||||
/// </summary>
|
||||
CIA,
|
||||
|
||||
/// <summary>
|
||||
/// Executable or library
|
||||
/// </summary>
|
||||
|
||||
@@ -43,6 +43,12 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region CIA
|
||||
|
||||
// No magic checks for CIA
|
||||
|
||||
#endregion
|
||||
|
||||
#region Executable
|
||||
|
||||
// DOS MZ executable file format (and descendants)
|
||||
@@ -359,6 +365,13 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region CIA
|
||||
|
||||
if (extension.Equals("cia", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.CIA;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Executable
|
||||
|
||||
// DOS MZ executable file format (and descendants)
|
||||
@@ -704,6 +717,7 @@ namespace BurnOutSharp.Tools
|
||||
case SupportedFileType.BFPK: return new FileType.BFPK();
|
||||
case SupportedFileType.BSP: return new FileType.BSP();
|
||||
case SupportedFileType.BZip2: return new FileType.BZip2();
|
||||
//case SupportedFileType.CIA: return new FileType.CIA();
|
||||
case SupportedFileType.Executable: return new FileType.Executable();
|
||||
case SupportedFileType.GCF: return new FileType.GCF();
|
||||
case SupportedFileType.GZIP: return new FileType.GZIP();
|
||||
|
||||
@@ -174,6 +174,25 @@ namespace Test
|
||||
bsp.Print();
|
||||
}
|
||||
|
||||
// CIA
|
||||
else if (ft == SupportedFileType.CIA)
|
||||
{
|
||||
// Build the CIA information
|
||||
Console.WriteLine("Creating CIA deserializer");
|
||||
Console.WriteLine();
|
||||
|
||||
var cia = CIA.Create(stream);
|
||||
if (cia == null)
|
||||
{
|
||||
Console.WriteLine("Something went wrong parsing CIA");
|
||||
Console.WriteLine();
|
||||
return;
|
||||
}
|
||||
|
||||
// Print the CIA info to screen
|
||||
cia.Print();
|
||||
}
|
||||
|
||||
// GCF
|
||||
else if (ft == SupportedFileType.GCF)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user