diff --git a/BurnOutSharp/Enums.cs b/BurnOutSharp/Enums.cs index 637a052e..74db8859 100644 --- a/BurnOutSharp/Enums.cs +++ b/BurnOutSharp/Enums.cs @@ -25,6 +25,11 @@ /// BZip2, + /// + /// CTR Importable Archive + /// + CIA, + /// /// Executable or library /// diff --git a/BurnOutSharp/Tools/Utilities.cs b/BurnOutSharp/Tools/Utilities.cs index 8756218d..3ba036d1 100644 --- a/BurnOutSharp/Tools/Utilities.cs +++ b/BurnOutSharp/Tools/Utilities.cs @@ -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(); diff --git a/Test/Printer.cs b/Test/Printer.cs index b281233c..a9c6059e 100644 --- a/Test/Printer.cs +++ b/Test/Printer.cs @@ -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) {