From cdf2cf030172ea38c8b7bfe3eba1593a593e9d13 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 13 Sep 2016 03:02:53 +0400 Subject: [PATCH] (TLG): recognize obfuscated header. --- ArcFormats/KiriKiri/ImageTLG.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArcFormats/KiriKiri/ImageTLG.cs b/ArcFormats/KiriKiri/ImageTLG.cs index 26e28417..af6a06a0 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 }; + Signatures = new uint[] { 0x30474c54, 0x35474c54, 0x36474c54, 0x35474cAB }; } public override ImageMetaData ReadMetaData (Stream stream) @@ -49,6 +49,8 @@ namespace GameRes.Formats.KiriKiri int version; if (!Binary.AsciiEqual (header, offset+6, "\x00raw\x1a")) return null; + if (0xAB == header[offset]) + header[offset] = (byte)'T'; if (Binary.AsciiEqual (header, offset, "TLG6.0")) version = 6; else if (Binary.AsciiEqual (header, offset, "TLG5.0"))