mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
fixed code to work with new resource settings interface.
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user