From 4c0c44de6be040858836a5c877f291a2af8375ee Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 7 Jan 2023 14:50:21 -0800 Subject: [PATCH] Add DS/3DS to Test printer --- BurnOutSharp/Tools/Utilities.cs | 3 +++ Test/Printer.cs | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/BurnOutSharp/Tools/Utilities.cs b/BurnOutSharp/Tools/Utilities.cs index 7b677f21..8756218d 100644 --- a/BurnOutSharp/Tools/Utilities.cs +++ b/BurnOutSharp/Tools/Utilities.cs @@ -715,6 +715,9 @@ namespace BurnOutSharp.Tools case SupportedFileType.MicrosoftLZ: return new FileType.MicrosoftLZ(); case SupportedFileType.MPQ: return new FileType.MPQ(); case SupportedFileType.MSI: return new FileType.MSI(); + //case SupportedFileType.N3DS: return new FileType.N3DS(); + //case SupportedFileType.NCF: return new FileType.NCF(); + //case SupportedFileType.Nitro: return new FileType.Nitro(); case SupportedFileType.PAK: return new FileType.PAK(); case SupportedFileType.PKZIP: return new FileType.PKZIP(); case SupportedFileType.PLJ: return new FileType.PLJ(); diff --git a/Test/Printer.cs b/Test/Printer.cs index e989cd2a..c7f1d033 100644 --- a/Test/Printer.cs +++ b/Test/Printer.cs @@ -235,6 +235,25 @@ namespace Test cabinet.Print(); } + // N3DS + else if (ft == SupportedFileType.NCF) + { + // Build the N3DS information + Console.WriteLine("Creating Nintendo 3DS deserializer"); + Console.WriteLine(); + + var n3ds = N3DS.Create(stream); + if (n3ds == null) + { + Console.WriteLine("Something went wrong parsing Nintendo 3DS"); + Console.WriteLine(); + return; + } + + // Print the N3DS info to screen + n3ds.Print(); + } + // NCF else if (ft == SupportedFileType.NCF) { @@ -254,6 +273,25 @@ namespace Test ncf.Print(); } + // Nitro + else if (ft == SupportedFileType.NCF) + { + // Build the NCF information + Console.WriteLine("Creating Nintendo DS/DSi deserializer"); + Console.WriteLine(); + + var nitro = Nitro.Create(stream); + if (nitro == null) + { + Console.WriteLine("Something went wrong parsing Nintendo DS/DSi"); + Console.WriteLine(); + return; + } + + // Print the Nitro info to screen + nitro.Print(); + } + // PAK else if (ft == SupportedFileType.PAK) {