From d7523ed83c06c1432b16ab895cecd3320b78ae46 Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 7 Mar 2019 06:24:35 +0400 Subject: [PATCH] (TLG): recognize obfuscated TLG5 images. --- ArcFormats/KiriKiri/ImageTLG.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ArcFormats/KiriKiri/ImageTLG.cs b/ArcFormats/KiriKiri/ImageTLG.cs index bfc50a77..f63f0d52 100644 --- a/ArcFormats/KiriKiri/ImageTLG.cs +++ b/ArcFormats/KiriKiri/ImageTLG.cs @@ -35,7 +35,7 @@ namespace GameRes.Formats.KiriKiri public TlgFormat () { Extensions = new string[] { "tlg", "tlg5", "tlg6" }; - Signatures = new uint[] { 0x30474c54, 0x35474c54, 0x36474c54, 0x35474cAB }; + Signatures = new uint[] { 0x30474C54, 0x35474C54, 0x36474C54, 0x35474CAB, 0x584D4B4A }; } public override ImageMetaData ReadMetaData (IBinaryStream stream) @@ -65,6 +65,12 @@ namespace GameRes.Formats.KiriKiri header[offset+0x0F] ^= 0xAB; header[offset+0x13] ^= 0xAC; } + else if (header.AsciiEqual (offset, "JKMXE8")) + { + version = 5; + header[offset+0x0C] ^= 0x1A; + header[offset+0x10] ^= 0x1C; + } else return null; int colors = header[offset+11];