implemented ABMP multi-frame images.

This commit is contained in:
morkt
2015-10-28 23:12:43 +04:00
parent d1c8038d85
commit 6369489fc6
3 changed files with 239 additions and 5 deletions

View File

@@ -130,9 +130,9 @@ namespace GameRes.Formats.Qlie
Decrypt (data, 0, data.Length, qent.Key);
if (qent.IsPacked)
{
data = Decompress (data);
if (null == data) // probably wrong decryption
return arc.File.CreateStream (entry.Offset, entry.Size);
var unpacked = Decompress (data);
if (null != unpacked)
data = unpacked;
}
return new MemoryStream (data);
}
@@ -162,7 +162,7 @@ namespace GameRes.Formats.Qlie
}
}
private byte[] Decompress (byte[] input)
internal static byte[] Decompress (byte[] input)
{
if (LittleEndian.ToUInt32 (input, 0) != 0xFF435031)
return null;