implemented IMGX images.

This commit is contained in:
morkt
2019-03-12 03:24:28 +04:00
parent 8ab228df40
commit 13edc4f265
3 changed files with 170 additions and 1 deletions

View File

@@ -23,7 +23,6 @@
// IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
@@ -99,6 +98,14 @@ namespace GameRes.Formats.Nonono
return new BinMemoryStream (data, entry.Name);
}
public override IImageDecoder OpenImage (ArcFile arc, Entry entry)
{
var input = arc.OpenBinaryEntry (entry);
if (input.Length <= 8 || input.Signature != 0x58474D49) // 'IMGX'
return ImageFormatDecoder.Create (input);
return new ImgXDecoder (input);
}
internal void Decrypt (byte[] data, int pos, int count, RandomGenerator rnd)
{
for (int i = 0; i < count; ++i)