From 0892e32a74edfdea661e3d02ce068007dabe635b Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 29 May 2015 18:59:23 +0400 Subject: [PATCH] (EriReader): added stubs for lossy decompression. --- ArcFormats/ImageERI.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ArcFormats/ImageERI.cs b/ArcFormats/ImageERI.cs index 57dc2058..c8398b12 100644 --- a/ArcFormats/ImageERI.cs +++ b/ArcFormats/ImageERI.cs @@ -285,6 +285,9 @@ namespace GameRes.Formats.Entis m_info = info; if (CvType.Lossless_ERI == m_info.Transformation) InitializeLossless(); + else if (CvType.LOT_ERI == m_info.Transformation + || CvType.DCT_ERI == m_info.Transformation) + InitializeLossy(); else throw new NotSupportedException ("Not supported ERI compression"); if (null != palette) @@ -379,6 +382,11 @@ namespace GameRes.Formats.Entis m_context = new RLEDecodeContext (0x10000); } + private void InitializeLossy () + { + throw new NotImplementedException ("Lossy ERI compression not implemented"); + } + int[] m_ptrTable; void InitializeArrangeTable () @@ -459,7 +467,10 @@ namespace GameRes.Formats.Entis public void DecodeImage () { - DecodeLosslessImage (m_context as RLEDecodeContext); + if (CvType.Lossless_ERI == m_info.Transformation) + DecodeLosslessImage (m_context as RLEDecodeContext); + else + DecodeLossyImage (m_context as HuffmanDecodeContext); } private delegate void PtrProcedure (); @@ -627,6 +638,11 @@ namespace GameRes.Formats.Entis } } + private void DecodeLossyImage (HuffmanDecodeContext context) + { + throw new NotImplementedException ("Lossy ERI compression not implemented"); + } + void PerformOperation (uint dwOpCode, int nAllBlockLines, sbyte[] pNextLineBuf, int iNextLineIdx ) { int i, j, k;