From 670c78302f1ecf16ae30a250a59cbd312f85a351 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 25 Oct 2023 23:03:40 -0400 Subject: [PATCH] Add printing for IRD, XMID, XeMID --- Test/Printer.cs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Test/Printer.cs b/Test/Printer.cs index 2868bd49..41f099ec 100644 --- a/Test/Printer.cs +++ b/Test/Printer.cs @@ -123,6 +123,7 @@ namespace Test case CIA item: return item.PrettyPrint(); case GCF item: return item.PrettyPrint(); case InstallShieldCabinet item: return item.PrettyPrint(); + case IRD item: return item.PrettyPrint(); case LinearExecutable item: return item.PrettyPrint(); case MicrosoftCabinet item: return item.PrettyPrint(); case MSDOS item: return item.PrettyPrint(); @@ -139,6 +140,8 @@ namespace Test case VBSP item: return item.PrettyPrint(); case VPK item: return item.PrettyPrint(); case WAD item: return item.PrettyPrint(); + case XMID item: return item.PrettyPrint(); + case XeMID item: return item.PrettyPrint(); case XZP item: return item.PrettyPrint(); default: return new StringBuilder(); } @@ -224,6 +227,16 @@ namespace Test return builder; } + /// + /// Export the item information as pretty-printed text + /// + private static StringBuilder PrettyPrint(this IRD item) + { + StringBuilder builder = new StringBuilder(); + SabreTools.Printing.IRD.Print(builder, item.Model); + return builder; + } + /// /// Export the item information as pretty-printed text /// @@ -384,6 +397,26 @@ namespace Test return builder; } + /// + /// Export the item information as pretty-printed text + /// + private static StringBuilder PrettyPrint(this XMID item) + { + StringBuilder builder = new StringBuilder(); + SabreTools.Printing.XMID.Print(builder, item.Model); + return builder; + } + + /// + /// Export the item information as pretty-printed text + /// + private static StringBuilder PrettyPrint(this XeMID item) + { + StringBuilder builder = new StringBuilder(); + SabreTools.Printing.XeMID.Print(builder, item.Model); + return builder; + } + /// /// Export the item information as pretty-printed text ///