fixed code to work with new resource settings interface.

This commit is contained in:
morkt
2018-01-08 20:04:23 +04:00
parent 2e2e447c42
commit cd4e1174af
56 changed files with 179 additions and 158 deletions

View File

@@ -28,7 +28,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Text;
using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -179,8 +178,8 @@ namespace GameRes.Formats.Eagls
public override ResourceOptions GetDefaultOptions ()
{
IEntryEncryption enc = null;
if (!string.IsNullOrEmpty (Settings.Default.EAGLSEncryption))
KnownSchemes.TryGetValue (Settings.Default.EAGLSEncryption, out enc);
if (!string.IsNullOrEmpty (Properties.Settings.Default.EAGLSEncryption))
KnownSchemes.TryGetValue (Properties.Settings.Default.EAGLSEncryption, out enc);
return new EaglsOptions { Encryption = enc };
}

View File

@@ -38,7 +38,7 @@ namespace GameRes.Formats.Eagls
}
[Export(typeof(ImageFormat))]
public class GrFormat : BmpFormat
public class GrFormat : ImageFormat
{
public override string Tag { get { return "GR"; } }
public override string Description { get { return "EAGLS engine compressed bitmap"; } }
@@ -78,7 +78,7 @@ namespace GameRes.Formats.Eagls
using (var bmp = new BinaryStream (lzs, file.Name))
{
if (32 != info.BPP)
return base.Read (bmp, info);
return Bmp.Read (bmp, info);
int stride = (int)info.Width*4;
var pixels = new byte[Math.Max (0x36, stride*info.Height)];
bmp.Read (pixels, 0, 0x36); // skip header