From 3ef5702a1b25e3d2226df8ee7a60d728f264333c Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 3 Feb 2018 20:05:39 +0400 Subject: [PATCH] (S5I): fixed reader. --- ArcFormats/rUGP/ImageS5I.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ArcFormats/rUGP/ImageS5I.cs b/ArcFormats/rUGP/ImageS5I.cs index 22e69aa5..b591714e 100644 --- a/ArcFormats/rUGP/ImageS5I.cs +++ b/ArcFormats/rUGP/ImageS5I.cs @@ -29,6 +29,11 @@ using System.Windows.Media; namespace GameRes.Formats.Rugp { + internal class S5iMetaData : RioMetaData + { + public int Schema; + } + [Export(typeof(ImageFormat))] public class S5iFormat : ImageFormat { @@ -47,7 +52,7 @@ namespace GameRes.Formats.Rugp if ("CS5i" != class_ref) return null; file.Seek (8, SeekOrigin.Current); - return new RioMetaData + return new S5iMetaData { Width = file.ReadUInt16(), Height = file.ReadUInt16(), @@ -59,7 +64,7 @@ namespace GameRes.Formats.Rugp public override ImageData Read (IBinaryStream file, ImageMetaData info) { - var meta = (RioMetaData)info; + var meta = (S5iMetaData)info; file.Position = meta.ObjectOffset + 0x14; int size; if (meta.Schema != 0)