diff --git a/ArcFormats/AZSys/ArcAZSys.cs b/ArcFormats/AZSys/ArcAZSys.cs
index ceef0302..963c8239 100644
--- a/ArcFormats/AZSys/ArcAZSys.cs
+++ b/ArcFormats/AZSys/ArcAZSys.cs
@@ -28,7 +28,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -161,7 +160,7 @@ namespace GameRes.Formats.AZSys
public override ResourceOptions GetDefaultOptions ()
{
- return new AsbOptions { AsbKey = GetAsbKey (Settings.Default.AZScriptScheme) };
+ return new AsbOptions { AsbKey = GetAsbKey (Properties.Settings.Default.AZScriptScheme) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Abel/ImageGPS.cs b/ArcFormats/Abel/ImageGPS.cs
index 229d21ce..e7509b03 100644
--- a/ArcFormats/Abel/ImageGPS.cs
+++ b/ArcFormats/Abel/ImageGPS.cs
@@ -40,7 +40,7 @@ namespace GameRes.Formats.Abel
}
[Export(typeof(ImageFormat))]
- public class GpsFormat : BmpFormat
+ public class GpsFormat : ImageFormat
{
public override string Tag { get { return "GPS"; } }
public override string Description { get { return "ADVEngine compressed bitmap"; } }
@@ -69,7 +69,7 @@ namespace GameRes.Formats.Abel
using (var stream = OpenGpsStream (file, gps.Compression, 0x54))
using (var input = BinaryStream.FromStream (stream, file.Name))
{
- var bmp_info = base.ReadMetaData (input);
+ var bmp_info = Bmp.ReadMetaData (input);
if (null == bmp_info)
return null;
gps.BPP = bmp_info.BPP;
@@ -83,7 +83,7 @@ namespace GameRes.Formats.Abel
file.Position = 0x29;
using (var stream = OpenGpsStream (file, gps.Compression, gps.UnpackedSize))
using (var input = BinaryStream.FromStream (stream, file.Name))
- return base.Read (input, info);
+ return Bmp.Read (input, info);
}
public override void Write (Stream file, ImageData image)
diff --git a/ArcFormats/Amaterasu/ArcAMI.cs b/ArcFormats/Amaterasu/ArcAMI.cs
index eb119887..35226a2e 100644
--- a/ArcFormats/Amaterasu/ArcAMI.cs
+++ b/ArcFormats/Amaterasu/ArcAMI.cs
@@ -32,7 +32,6 @@ using System.ComponentModel.Composition;
using System.Globalization;
using GameRes.Compression;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
namespace GameRes.Formats.Amaterasu
{
@@ -322,8 +321,8 @@ namespace GameRes.Formats.Amaterasu
public override ResourceOptions GetDefaultOptions ()
{
return new AmiOptions {
- UseBaseArchive = Settings.Default.AMIUseBaseArchive,
- BaseArchive = Settings.Default.AMIBaseArchive,
+ UseBaseArchive = Properties.Settings.Default.AMIUseBaseArchive,
+ BaseArchive = Properties.Settings.Default.AMIBaseArchive,
};
}
diff --git a/ArcFormats/AnimeGameSystem/ArcDAT.cs b/ArcFormats/AnimeGameSystem/ArcDAT.cs
index a57ebb30..feb1c556 100644
--- a/ArcFormats/AnimeGameSystem/ArcDAT.cs
+++ b/ArcFormats/AnimeGameSystem/ArcDAT.cs
@@ -27,9 +27,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
-using GameRes.Utility;
namespace GameRes.Formats.Ags
{
@@ -101,7 +99,7 @@ namespace GameRes.Formats.Ags
public override ResourceOptions GetDefaultOptions ()
{
- return new AgsOptions { Scheme = GetScheme (Settings.Default.AGSTitle) };
+ return new AgsOptions { Scheme = GetScheme (Properties.Settings.Default.AGSTitle) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/ArcFormats.csproj b/ArcFormats/ArcFormats.csproj
index d98775fc..b6355bd6 100644
--- a/ArcFormats/ArcFormats.csproj
+++ b/ArcFormats/ArcFormats.csproj
@@ -168,6 +168,7 @@
+
@@ -774,7 +775,7 @@
True
Settings.settings
-
+
True
True
diff --git a/ArcFormats/ArcZIP.cs b/ArcFormats/ArcZIP.cs
index 8ffc5473..3214568c 100644
--- a/ArcFormats/ArcZIP.cs
+++ b/ArcFormats/ArcZIP.cs
@@ -30,7 +30,6 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.PkWare
@@ -154,14 +153,14 @@ namespace GameRes.Formats.PkWare
Encoding enc;
try
{
- enc = Encoding.GetEncoding (Settings.Default.ZIPEncodingCP);
+ enc = Encoding.GetEncoding (Properties.Settings.Default.ZIPEncodingCP);
}
catch
{
enc = Encodings.cp932;
}
return new ZipOptions {
- CompressionLevel = Settings.Default.ZIPCompression,
+ CompressionLevel = Properties.Settings.Default.ZIPCompression,
FileNameEncoding = enc,
};
}
diff --git a/ArcFormats/BeF/ImageALO.cs b/ArcFormats/BeF/ImageALO.cs
index f4de5c86..dae37634 100644
--- a/ArcFormats/BeF/ImageALO.cs
+++ b/ArcFormats/BeF/ImageALO.cs
@@ -29,7 +29,7 @@ using System.IO;
namespace GameRes.Formats.BeF
{
[Export(typeof(ImageFormat))]
- public class AloFormat : BmpFormat
+ public class AloFormat : ImageFormat
{
public override string Tag { get { return "ALO"; } }
public override string Description { get { return "Obfuscated bitmap"; } }
@@ -44,13 +44,13 @@ namespace GameRes.Formats.BeF
if (0 != header[0] || 0 != header[1])
return null;
using (var bmp = OpenAsBitmap (stream))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
public override ImageData Read (IBinaryStream stream, ImageMetaData info)
{
using (var bmp = OpenAsBitmap (stream))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
IBinaryStream OpenAsBitmap (IBinaryStream input)
@@ -65,7 +65,7 @@ namespace GameRes.Formats.BeF
{
using (var bmp = new MemoryStream())
{
- base.Write (bmp, image);
+ Bmp.Write (bmp, image);
file.WriteByte (0);
file.WriteByte (0);
bmp.Position = 2;
diff --git a/ArcFormats/BlackRainbow/ImageBMZ.cs b/ArcFormats/BlackRainbow/ImageBMZ.cs
index 20e231c0..2be03f82 100644
--- a/ArcFormats/BlackRainbow/ImageBMZ.cs
+++ b/ArcFormats/BlackRainbow/ImageBMZ.cs
@@ -32,7 +32,7 @@ using GameRes.Compression;
namespace GameRes.Formats.BlackRainbow
{
[Export(typeof(ImageFormat))]
- public class BmzFormat : BmpFormat
+ public class BmzFormat : ImageFormat
{
public override string Tag { get { return "BMZ"; } }
public override string Description { get { return "Compressed bitmap format"; } }
@@ -43,7 +43,7 @@ namespace GameRes.Formats.BlackRainbow
{
using (var bmp = new MemoryStream())
{
- base.Write (bmp, image);
+ Bmp.Write (bmp, image);
using (var output = new BinaryWriter (file, Encoding.ASCII, true))
{
output.Write (Signature);
@@ -60,7 +60,7 @@ namespace GameRes.Formats.BlackRainbow
var header = file.ReadHeader (8);
using (var zstream = new ZLibStream (file.AsStream, CompressionMode.Decompress, true))
using (var bmp = new BinaryStream (zstream, file.Name))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
public override ImageData Read (IBinaryStream file, ImageMetaData info)
@@ -69,7 +69,7 @@ namespace GameRes.Formats.BlackRainbow
using (var zstream = new ZLibStream (file.AsStream, CompressionMode.Decompress, true))
using (var input = new SeekableStream (zstream))
using (var bmp = new BinaryStream (input, file.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
}
}
diff --git a/ArcFormats/CatSystem/ArcINT.cs b/ArcFormats/CatSystem/ArcINT.cs
index 391646be..d20197e2 100644
--- a/ArcFormats/CatSystem/ArcINT.cs
+++ b/ArcFormats/CatSystem/ArcINT.cs
@@ -32,7 +32,6 @@ using System.ComponentModel.Composition;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
using GameRes.Cryptography;
using GameRes.Utility;
@@ -249,7 +248,7 @@ namespace GameRes.Formats.CatSystem
public override ResourceOptions GetDefaultOptions ()
{
return new IntOptions {
- EncryptionInfo = Settings.Default.INTEncryption ?? new IntEncryptionInfo(),
+ EncryptionInfo = Properties.Settings.Default.INTEncryption ?? new IntEncryptionInfo(),
};
}
@@ -258,7 +257,7 @@ namespace GameRes.Formats.CatSystem
var widget = w as GUI.WidgetINT;
if (null != widget)
{
- Settings.Default.INTEncryption = widget.Info;
+ Properties.Settings.Default.INTEncryption = widget.Info;
return new IntOptions { EncryptionInfo = widget.Info };
}
return this.GetDefaultOptions();
diff --git a/ArcFormats/Crowd/ImageZBM.cs b/ArcFormats/Crowd/ImageZBM.cs
index d1dbc2f2..2a3abbb3 100644
--- a/ArcFormats/Crowd/ImageZBM.cs
+++ b/ArcFormats/Crowd/ImageZBM.cs
@@ -32,7 +32,7 @@ using GameRes.Utility;
namespace GameRes.Formats.Crowd
{
[Export(typeof(ImageFormat))]
- public class ZbmFormat : BmpFormat
+ public class ZbmFormat : ImageFormat
{
public override string Tag { get { return "ZBM"; } }
public override string Description { get { return "Crowd LZ-compressed bitmap"; } }
@@ -52,7 +52,7 @@ namespace GameRes.Formats.Crowd
for (int i = 0; i < 54; ++i)
header[i] ^= 0xff;
using (var bmp = new BinMemoryStream (header, stream.Name))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
}
@@ -74,7 +74,7 @@ namespace GameRes.Formats.Crowd
for (int i = 0; i < count; ++i)
data[i] ^= 0xff;
using (var bmp = new BinMemoryStream (data, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
}
diff --git a/ArcFormats/Cyberworks/ArcDAT.cs b/ArcFormats/Cyberworks/ArcDAT.cs
index 57a58f86..bc3fdd31 100644
--- a/ArcFormats/Cyberworks/ArcDAT.cs
+++ b/ArcFormats/Cyberworks/ArcDAT.cs
@@ -31,7 +31,6 @@ using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -321,7 +320,7 @@ namespace GameRes.Formats.Cyberworks
public override ResourceOptions GetDefaultOptions ()
{
- return new BellOptions { Scheme = GetScheme (Settings.Default.BELLTitle) };
+ return new BellOptions { Scheme = GetScheme (Properties.Settings.Default.BELLTitle) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Dac/ArcDPK.cs b/ArcFormats/Dac/ArcDPK.cs
index 9742e776..7699dd0d 100644
--- a/ArcFormats/Dac/ArcDPK.cs
+++ b/ArcFormats/Dac/ArcDPK.cs
@@ -28,7 +28,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Globalization;
using System.IO;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -193,8 +192,8 @@ namespace GameRes.Formats.Dac
public override ResourceOptions GetDefaultOptions ()
{
return new DpkOptions {
- Key1 = Settings.Default.DPKKey1,
- Key2 = Settings.Default.DPKKey2,
+ Key1 = Properties.Settings.Default.DPKKey1,
+ Key2 = Properties.Settings.Default.DPKKey2,
};
}
@@ -205,9 +204,9 @@ namespace GameRes.Formats.Dac
{
uint result_key;
if (uint.TryParse (widget.Key1.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result_key))
- Settings.Default.DPKKey1 = result_key;
+ Properties.Settings.Default.DPKKey1 = result_key;
if (uint.TryParse (widget.Key2.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result_key))
- Settings.Default.DPKKey2 = result_key;
+ Properties.Settings.Default.DPKKey2 = result_key;
}
return this.GetDefaultOptions();
}
diff --git a/ArcFormats/DxLib/ArcMED.cs b/ArcFormats/DxLib/ArcMED.cs
index d375a432..a3460c7f 100644
--- a/ArcFormats/DxLib/ArcMED.cs
+++ b/ArcFormats/DxLib/ArcMED.cs
@@ -27,7 +27,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -168,7 +167,7 @@ namespace GameRes.Formats.DxLib
public override ResourceOptions GetDefaultOptions ()
{
return new MedOptions {
- Encryption = GetEncryption (Settings.Default.MEDScriptScheme),
+ Encryption = GetEncryption (Properties.Settings.Default.MEDScriptScheme),
};
}
diff --git a/ArcFormats/Eagls/ArcEAGLS.cs b/ArcFormats/Eagls/ArcEAGLS.cs
index 9cff7b86..1dcc5723 100644
--- a/ArcFormats/Eagls/ArcEAGLS.cs
+++ b/ArcFormats/Eagls/ArcEAGLS.cs
@@ -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 };
}
diff --git a/ArcFormats/Eagls/ImageGR.cs b/ArcFormats/Eagls/ImageGR.cs
index e8a80541..738cc7ac 100644
--- a/ArcFormats/Eagls/ImageGR.cs
+++ b/ArcFormats/Eagls/ImageGR.cs
@@ -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
diff --git a/ArcFormats/Entis/ArcNOA.cs b/ArcFormats/Entis/ArcNOA.cs
index f6db4571..ef1a4732 100644
--- a/ArcFormats/Entis/ArcNOA.cs
+++ b/ArcFormats/Entis/ArcNOA.cs
@@ -31,7 +31,6 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -244,8 +243,8 @@ namespace GameRes.Formats.Entis
public override ResourceOptions GetDefaultOptions ()
{
return new NoaOptions {
- Scheme = Settings.Default.NOAScheme,
- PassPhrase = Settings.Default.NOAPassPhrase,
+ Scheme = Properties.Settings.Default.NOAScheme,
+ PassPhrase = Properties.Settings.Default.NOAPassPhrase,
};
}
diff --git a/ArcFormats/ExHibit/ImageGYU.cs b/ArcFormats/ExHibit/ImageGYU.cs
index 72aa8435..c0bf9f62 100644
--- a/ArcFormats/ExHibit/ImageGYU.cs
+++ b/ArcFormats/ExHibit/ImageGYU.cs
@@ -34,7 +34,6 @@ using GameRes.Utility;
using GameRes.Compression;
using GameRes.Cryptography;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
namespace GameRes.Formats.ExHibit
{
@@ -130,7 +129,7 @@ namespace GameRes.Formats.ExHibit
public override ResourceOptions GetDefaultOptions ()
{
- return new GyuOptions { Scheme = GetScheme (Settings.Default.GYUTitle) };
+ return new GyuOptions { Scheme = GetScheme (Properties.Settings.Default.GYUTitle) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/FC01/ArcMCA.cs b/ArcFormats/FC01/ArcMCA.cs
index dbbd68c5..cbe94084 100644
--- a/ArcFormats/FC01/ArcMCA.cs
+++ b/ArcFormats/FC01/ArcMCA.cs
@@ -23,7 +23,6 @@
// IN THE SOFTWARE.
//
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using System;
using System.Collections.Generic;
@@ -114,14 +113,14 @@ namespace GameRes.Formats.FC01
public override ResourceOptions GetDefaultOptions ()
{
- return new McgOptions { Key = Settings.Default.MCGLastKey };
+ return new McgOptions { Key = Properties.Settings.Default.MCGLastKey };
}
public override ResourceOptions GetOptions (object widget)
{
var w = widget as GUI.WidgetMCG;
if (null != w)
- Settings.Default.MCGLastKey = w.GetKey();
+ Properties.Settings.Default.MCGLastKey = w.GetKey ();
return GetDefaultOptions();
}
diff --git a/ArcFormats/FC01/ImageMCG.cs b/ArcFormats/FC01/ImageMCG.cs
index 1b6f7a75..ba32aa9c 100644
--- a/ArcFormats/FC01/ImageMCG.cs
+++ b/ArcFormats/FC01/ImageMCG.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -102,7 +101,7 @@ namespace GameRes.Formats.FC01
public override ImageData Read (IBinaryStream stream, ImageMetaData info)
{
var meta = (McgMetaData)info;
- byte key = Settings.Default.MCGLastKey;
+ byte key = Properties.Settings.Default.MCGLastKey;
if (101 == meta.Version)
{
if (null == LastKey)
@@ -127,14 +126,14 @@ namespace GameRes.Formats.FC01
public override ResourceOptions GetDefaultOptions ()
{
- return new McgOptions { Key = Settings.Default.MCGLastKey };
+ return new McgOptions { Key = Properties.Settings.Default.MCGLastKey };
}
public override ResourceOptions GetOptions (object widget)
{
var w = widget as GUI.WidgetMCG;
if (null != w)
- Settings.Default.MCGLastKey = w.GetKey();
+ Properties.Settings.Default.MCGLastKey = w.GetKey ();
return GetDefaultOptions();
}
@@ -272,10 +271,10 @@ namespace GameRes.Formats.FC01
continue;
}
Transform();
- Settings.Default.MCGLastKey = m_key;
+ Properties.Settings.Default.MCGLastKey = m_key;
return;
}
- while (m_key != Settings.Default.MCGLastKey);
+ while (m_key != Properties.Settings.Default.MCGLastKey);
throw new UnknownEncryptionScheme();
}
diff --git a/ArcFormats/FlyingShine/ArcPD.cs b/ArcFormats/FlyingShine/ArcPD.cs
index 679f004c..7ac34c79 100644
--- a/ArcFormats/FlyingShine/ArcPD.cs
+++ b/ArcFormats/FlyingShine/ArcPD.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Text;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -94,7 +93,7 @@ namespace GameRes.Formats.Fs
public override ResourceOptions GetDefaultOptions ()
{
- return new PdOptions { ScrambleContents = Settings.Default.PDScrambleContents };
+ return new PdOptions { ScrambleContents = Properties.Settings.Default.PDScrambleContents };
}
public override object GetCreationWidget ()
diff --git a/ArcFormats/Ikura/ArcDRS.cs b/ArcFormats/Ikura/ArcDRS.cs
index 25cedd97..845cde41 100644
--- a/ArcFormats/Ikura/ArcDRS.cs
+++ b/ArcFormats/Ikura/ArcDRS.cs
@@ -31,7 +31,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using GameRes.Utility;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
namespace GameRes.Formats.Ikura
{
@@ -219,7 +218,7 @@ namespace GameRes.Formats.Ikura
public override ResourceOptions GetDefaultOptions ()
{
return new IsfOptions {
- Secret = GetSecret (Settings.Default.ISFScheme) ?? new byte[0]
+ Secret = GetSecret (Properties.Settings.Default.ISFScheme) ?? new byte[0]
};
}
diff --git a/ArcFormats/ImageEGN.cs b/ArcFormats/ImageEGN.cs
index 84d2acc0..e4bc02e6 100644
--- a/ArcFormats/ImageEGN.cs
+++ b/ArcFormats/ImageEGN.cs
@@ -42,7 +42,7 @@ namespace GameRes.Formats.Unknown
}
[Export(typeof(ImageFormat))]
- public class EgnFormat : BmpFormat
+ public class EgnFormat : ImageFormat
{
public override string Tag { get { return "EGN"; } }
public override string Description { get { return "LZSS-compressed BMP image"; } }
@@ -73,7 +73,7 @@ namespace GameRes.Formats.Unknown
reader.Unpack();
using (var bmp = new BinMemoryStream (reader.Data, stream.Name))
{
- var info = base.ReadMetaData (bmp);
+ var info = Bmp.ReadMetaData (bmp);
if (null == info)
return null;
return new EgnMetaData
@@ -96,7 +96,7 @@ namespace GameRes.Formats.Unknown
var reader = new Reader (stream, meta.UnpackedSize, meta.Mode, meta.Flag);
reader.Unpack();
using (var bmp = new BinMemoryStream (reader.Data, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
internal class Reader
diff --git a/ArcFormats/ImageLZ.cs b/ArcFormats/ImageLZ.cs
index 61138c5b..ab98696f 100644
--- a/ArcFormats/ImageLZ.cs
+++ b/ArcFormats/ImageLZ.cs
@@ -31,7 +31,7 @@ using GameRes.Compression;
namespace GameRes.Formats
{
[Export(typeof(ImageFormat))]
- public class Bm_Format : BmpFormat
+ public class Bm_Format : ImageFormat
{
public override string Tag { get { return "BM_"; } }
public override string Description { get { return "LZ-compressed bitmap"; } }
@@ -52,7 +52,7 @@ namespace GameRes.Formats
lz.Config.FrameFill = 0x20;
lz.Config.FrameInitPos = 0x1000 - 0x10;
using (var bmp = new BinaryStream (lz, stream.Name))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
}
@@ -65,7 +65,7 @@ namespace GameRes.Formats
lz.Config.FrameFill = 0x20;
lz.Config.FrameInitPos = 0x1000 - 0x10;
using (var bmp = new BinaryStream (lz, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
}
diff --git a/ArcFormats/ImageMB.cs b/ArcFormats/ImageMB.cs
index 34894e33..b0640e19 100644
--- a/ArcFormats/ImageMB.cs
+++ b/ArcFormats/ImageMB.cs
@@ -29,7 +29,7 @@ using System.IO;
namespace GameRes.Formats
{
[Export(typeof(ImageFormat))]
- public class MbImageFormat : BmpFormat
+ public class MbImageFormat : ImageFormat
{
public override string Tag { get { return "BMP/MB"; } }
public override string Description { get { return "Obfuscated bitmap"; } }
@@ -43,13 +43,13 @@ namespace GameRes.Formats
if ('M' != c1 || 'B' != c2)
return null;
using (var bmp = OpenAsBitmap (stream))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
public override ImageData Read (IBinaryStream stream, ImageMetaData info)
{
using (var bmp = OpenAsBitmap (stream))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
protected IBinaryStream OpenAsBitmap (IBinaryStream input)
@@ -64,7 +64,7 @@ namespace GameRes.Formats
{
using (var bmp = new MemoryStream())
{
- base.Write (bmp, image);
+ Bmp.Write (bmp, image);
file.WriteByte ((byte)'M');
file.WriteByte ((byte)'B');
bmp.Position = 2;
diff --git a/ArcFormats/ImagePIC.cs b/ArcFormats/ImagePIC.cs
index e16e4e0e..e1bd4a11 100644
--- a/ArcFormats/ImagePIC.cs
+++ b/ArcFormats/ImagePIC.cs
@@ -30,7 +30,7 @@ using GameRes.Utility;
namespace GameRes.Formats.Sprite
{
[Export(typeof(ImageFormat))]
- public class PicFormat : BmpFormat
+ public class PicFormat : ImageFormat
{
public override string Tag { get { return "PIC/SPRITE"; } }
public override string Description { get { return "Soft House Sprite bitmap format"; } }
@@ -42,13 +42,13 @@ namespace GameRes.Formats.Sprite
public override ImageMetaData ReadMetaData (IBinaryStream file)
{
using (var bmp = OpenAsBitmap (file))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
public override ImageData Read (IBinaryStream file, ImageMetaData info)
{
using (var bmp = OpenAsBitmap (file))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
IBinaryStream OpenAsBitmap (IBinaryStream input)
@@ -66,7 +66,7 @@ namespace GameRes.Formats.Sprite
{
using (var bmp = new MemoryStream())
{
- base.Write (bmp, image);
+ Bmp.Write (bmp, image);
var header = new byte[HeaderSize];
header[0] = (byte)'P';
header[1] = (byte)'I';
diff --git a/ArcFormats/ImagePTI.cs b/ArcFormats/ImagePTI.cs
index 10bf23d8..183023d5 100644
--- a/ArcFormats/ImagePTI.cs
+++ b/ArcFormats/ImagePTI.cs
@@ -30,7 +30,7 @@ using System.IO;
namespace GameRes.Formats.Misc
{
[Export(typeof(ImageFormat))]
- public class PtiFormat : BmpFormat
+ public class PtiFormat : ImageFormat
{
public override string Tag { get { return "PTI"; } }
public override string Description { get { return "Custom BMP image"; } }
@@ -43,7 +43,7 @@ namespace GameRes.Formats.Misc
if (null == header)
return null;
using (var bmp = new BinMemoryStream (header, stream.Name))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
byte[] ReadHeader (IBinaryStream stream)
@@ -72,7 +72,7 @@ namespace GameRes.Formats.Misc
}
LittleEndian.Pack (length+0x36, image, 2);
using (var bmp = new BinMemoryStream (image, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
public override void Write (Stream file, ImageData image)
diff --git a/ArcFormats/KiriKiri/ArcXP3.cs b/ArcFormats/KiriKiri/ArcXP3.cs
index 2a6a71ea..cb32f966 100644
--- a/ArcFormats/KiriKiri/ArcXP3.cs
+++ b/ArcFormats/KiriKiri/ArcXP3.cs
@@ -37,7 +37,6 @@ using System.Diagnostics;
using GameRes.Compression;
using GameRes.Utility;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
namespace GameRes.Formats.KiriKiri
{
@@ -348,11 +347,11 @@ NextEntry:
public override ResourceOptions GetDefaultOptions ()
{
return new Xp3Options {
- Version = Settings.Default.XP3Version,
- Scheme = GetScheme (Settings.Default.XP3Scheme),
- CompressIndex = Settings.Default.XP3CompressHeader,
- CompressContents = Settings.Default.XP3CompressContents,
- RetainDirs = Settings.Default.XP3RetainStructure,
+ Version = Properties.Settings.Default.XP3Version,
+ Scheme = GetScheme (Properties.Settings.Default.XP3Scheme),
+ CompressIndex = Properties.Settings.Default.XP3CompressHeader,
+ CompressContents = Properties.Settings.Default.XP3CompressContents,
+ RetainDirs = Properties.Settings.Default.XP3RetainStructure,
};
}
diff --git a/ArcFormats/LiveMaker/ImageGAL.cs b/ArcFormats/LiveMaker/ImageGAL.cs
index 628fa324..48f3aba4 100644
--- a/ArcFormats/LiveMaker/ImageGAL.cs
+++ b/ArcFormats/LiveMaker/ImageGAL.cs
@@ -31,7 +31,6 @@ using System.Linq;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -145,7 +144,7 @@ namespace GameRes.Formats.LiveMaker
public override ResourceOptions GetDefaultOptions ()
{
- return new GalOptions { Key = KeyFromString (Settings.Default.GALKey) };
+ return new GalOptions { Key = KeyFromString (Properties.Settings.Default.GALKey) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Lucifen/ArcLPK.cs b/ArcFormats/Lucifen/ArcLPK.cs
index 1acd8952..63f71292 100644
--- a/ArcFormats/Lucifen/ArcLPK.cs
+++ b/ArcFormats/Lucifen/ArcLPK.cs
@@ -30,7 +30,6 @@ using System.IO;
using System.Linq;
using System.Text;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -342,7 +341,7 @@ namespace GameRes.Formats.Lucifen
public override ResourceOptions GetDefaultOptions ()
{
- return new LuciOptions { Scheme = Settings.Default.LPKScheme };
+ return new LuciOptions { Scheme = Properties.Settings.Default.LPKScheme };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Majiro/ImageRCT.cs b/ArcFormats/Majiro/ImageRCT.cs
index bbd4dbb0..01d5d17c 100644
--- a/ArcFormats/Majiro/ImageRCT.cs
+++ b/ArcFormats/Majiro/ImageRCT.cs
@@ -33,7 +33,6 @@ using System.Diagnostics;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -61,15 +60,26 @@ namespace GameRes.Formats.Majiro
}
[Export(typeof(ImageFormat))]
- public class RctFormat : ImageFormat
+ public sealed class RctFormat : ImageFormat
{
public override string Tag { get { return "RCT"; } }
public override string Description { get { return "Majiro game engine RGB image format"; } }
public override uint Signature { get { return 0x9a925a98; } }
public override bool CanWrite { get { return true; } }
- public bool OverlayFrames = true;
- public bool ApplyMask = true;
+ public RctFormat ()
+ {
+ Settings = new[] { OverlayFrames, ApplyMask };
+ }
+
+ LocalResourceSetting OverlayFrames = new LocalResourceSetting {
+ Name = "RCTOverlayFrames",
+ Text = "Automatically combine incremental frames",
+ };
+ LocalResourceSetting ApplyMask = new LocalResourceSetting {
+ Name = "RCTApplyMask",
+ Text = "Automatically load alpha-channel",
+ };
public const int BaseRecursionLimit = 8;
public static Dictionary KnownKeys = new Dictionary();
@@ -129,11 +139,10 @@ namespace GameRes.Formats.Majiro
{
var meta = (RctMetaData)info;
var pixels = ReadPixelsData (file, meta);
- if (ApplyMask)
+ if (ApplyMask.Get())
{
- var base_name = Path.GetFileNameWithoutExtension (meta.FileName);
- var mask_name = base_name + "_.rc8";
- mask_name = VFS.CombinePath (VFS.GetDirectoryName (meta.FileName), mask_name);
+ var mask_name = Path.GetFileNameWithoutExtension (meta.FileName) + "_.rc8";
+ mask_name = VFS.ChangeFileName (meta.FileName, mask_name);
if (VFS.FileExists (mask_name))
{
try
@@ -196,7 +205,7 @@ namespace GameRes.Formats.Majiro
byte[] ReadPixelsData (IBinaryStream file, RctMetaData meta)
{
byte[] base_image = null;
- if (meta.FileName != null && meta.BaseNameLength > 0 && OverlayFrames
+ if (meta.FileName != null && meta.BaseNameLength > 0 && OverlayFrames.Get()
&& meta.BaseRecursionDepth < BaseRecursionLimit)
base_image = ReadBaseImage (file, meta);
@@ -379,14 +388,14 @@ namespace GameRes.Formats.Majiro
public override ResourceOptions GetDefaultOptions ()
{
- return new RctOptions { Password = Settings.Default.RCTPassword };
+ return new RctOptions { Password = Properties.Settings.Default.RCTPassword };
}
public override ResourceOptions GetOptions (object widget)
{
var w = widget as GUI.WidgetRCT;
if (null != w)
- Settings.Default.RCTPassword = w.Password.Text;
+ Properties.Settings.Default.RCTPassword = w.Password.Text;
return GetDefaultOptions();
}
diff --git a/ArcFormats/MangaGamer/ArcMGPK.cs b/ArcFormats/MangaGamer/ArcMGPK.cs
index 2e5d17f9..0cc08e1f 100644
--- a/ArcFormats/MangaGamer/ArcMGPK.cs
+++ b/ArcFormats/MangaGamer/ArcMGPK.cs
@@ -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;
@@ -178,7 +177,7 @@ namespace GameRes.Formats.Mg
public override ResourceOptions GetDefaultOptions ()
{
- return new MgOptions { Key = GetKey (Settings.Default.MGPKTitle) };
+ return new MgOptions { Key = GetKey (Properties.Settings.Default.MGPKTitle) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Marble/ArcMBL.cs b/ArcFormats/Marble/ArcMBL.cs
index cd21f09b..dafd43e5 100644
--- a/ArcFormats/Marble/ArcMBL.cs
+++ b/ArcFormats/Marble/ArcMBL.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.Marble
@@ -206,7 +205,7 @@ namespace GameRes.Formats.Marble
public override ResourceOptions GetDefaultOptions ()
{
- return new MblOptions { PassPhrase = Settings.Default.MBLPassPhrase };
+ return new MblOptions { PassPhrase = Properties.Settings.Default.MBLPassPhrase };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/MokoPro/CompressedFile.cs b/ArcFormats/MokoPro/CompressedFile.cs
index 95c1359d..c3341c46 100644
--- a/ArcFormats/MokoPro/CompressedFile.cs
+++ b/ArcFormats/MokoPro/CompressedFile.cs
@@ -86,7 +86,7 @@ namespace GameRes.Formats.Mokopro
}
[Export(typeof(ImageFormat))]
- public class NNNNBmpFormat : BmpFormat
+ public class NNNNBmpFormat : ImageFormat
{
public override string Tag { get { return "BMP/NNNN"; } }
public override string Description { get { return "Mokopro compressed bitmap"; } }
@@ -104,7 +104,7 @@ namespace GameRes.Formats.Mokopro
using (var lzss = moko.UnpackStream())
using (var bmp = new BinaryStream (lzss, stream.Name))
{
- var info = base.ReadMetaData (bmp);
+ var info = Bmp.ReadMetaData (bmp);
if (null == info)
return null;
return new NNNNMetaData
@@ -123,7 +123,7 @@ namespace GameRes.Formats.Mokopro
var meta = (NNNNMetaData)info;
using (var lzss = meta.Input.UnpackStream())
using (var bmp = new BinaryStream (lzss, stream.Name))
- return base.Read (bmp, meta.BmpInfo);
+ return Bmp.Read (bmp, meta.BmpInfo);
}
public override void Write (Stream file, ImageData image)
diff --git a/ArcFormats/Musica/ArcPAZ.cs b/ArcFormats/Musica/ArcPAZ.cs
index 40c75b73..ab8ed27b 100644
--- a/ArcFormats/Musica/ArcPAZ.cs
+++ b/ArcFormats/Musica/ArcPAZ.cs
@@ -26,10 +26,8 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
-using System.Security.Cryptography;
using GameRes.Compression;
using GameRes.Cryptography;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -358,7 +356,7 @@ namespace GameRes.Formats.Musica
public override ResourceOptions GetDefaultOptions ()
{
- return new PazOptions { Scheme = GetScheme (Settings.Default.PAZTitle) };
+ return new PazOptions { Scheme = GetScheme (Properties.Settings.Default.PAZTitle) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/NScripter/ArcNS2.cs b/ArcFormats/NScripter/ArcNS2.cs
index 5535f3ec..e5e01cbb 100644
--- a/ArcFormats/NScripter/ArcNS2.cs
+++ b/ArcFormats/NScripter/ArcNS2.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Security.Cryptography;
using System.Text;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.NScripter
@@ -150,14 +149,14 @@ namespace GameRes.Formats.NScripter
public override ResourceOptions GetDefaultOptions ()
{
- return new NsaOptions { Password = Settings.Default.NSAPassword };
+ return new NsaOptions { Password = Properties.Settings.Default.NSAPassword };
}
public override ResourceOptions GetOptions (object widget)
{
var w = widget as GUI.WidgetNSA;
if (null != w)
- Settings.Default.NSAPassword = w.Password.Text;
+ Properties.Settings.Default.NSAPassword = w.Password.Text;
return GetDefaultOptions();
}
diff --git a/ArcFormats/NScripter/ArcNSA.cs b/ArcFormats/NScripter/ArcNSA.cs
index 58a26094..217d4091 100644
--- a/ArcFormats/NScripter/ArcNSA.cs
+++ b/ArcFormats/NScripter/ArcNSA.cs
@@ -29,7 +29,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Text;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
using GameRes.Utility;
namespace GameRes.Formats.NScripter
@@ -203,8 +202,8 @@ namespace GameRes.Formats.NScripter
public override ResourceOptions GetDefaultOptions ()
{
return new NsaOptions {
- CompressionType = Settings.Default.ONSCompression,
- Password = Settings.Default.NSAPassword,
+ CompressionType = Properties.Settings.Default.ONSCompression,
+ Password = Properties.Settings.Default.NSAPassword,
};
}
@@ -212,7 +211,7 @@ namespace GameRes.Formats.NScripter
{
var w = widget as GUI.WidgetNSA;
if (null != w)
- Settings.Default.NSAPassword = w.Password.Text;
+ Properties.Settings.Default.NSAPassword = w.Password.Text;
return GetDefaultOptions();
}
diff --git a/ArcFormats/NSystem/ArcFJSYS.cs b/ArcFormats/NSystem/ArcFJSYS.cs
index b9458aa4..191b5f3d 100644
--- a/ArcFormats/NSystem/ArcFJSYS.cs
+++ b/ArcFormats/NSystem/ArcFJSYS.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Security.Cryptography;
using System.Text;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -118,7 +117,7 @@ namespace GameRes.Formats.NSystem
public override ResourceOptions GetDefaultOptions ()
{
- return new FjsysOptions { MsdPassword = Settings.Default.FJSYSPassword };
+ return new FjsysOptions { MsdPassword = Properties.Settings.Default.FJSYSPassword };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/NitroPlus/ArcNPA.cs b/ArcFormats/NitroPlus/ArcNPA.cs
index d0de4938..e92bdfb5 100644
--- a/ArcFormats/NitroPlus/ArcNPA.cs
+++ b/ArcFormats/NitroPlus/ArcNPA.cs
@@ -382,10 +382,10 @@ namespace GameRes.Formats.NitroPlus
public override ResourceOptions GetDefaultOptions ()
{
return new NpaOptions {
- Scheme = GetScheme (Settings.Default.NPAScheme),
- CompressContents = Settings.Default.NPACompressContents,
- Key1 = (int)Settings.Default.NPAKey1,
- Key2 = (int)Settings.Default.NPAKey2,
+ Scheme = GetScheme (Properties.Settings.Default.NPAScheme),
+ CompressContents = Properties.Settings.Default.NPACompressContents,
+ Key1 = (int)Properties.Settings.Default.NPAKey1,
+ Key2 = (int)Properties.Settings.Default.NPAKey2,
};
}
diff --git a/ArcFormats/NitroPlus/ArcNPK.cs b/ArcFormats/NitroPlus/ArcNPK.cs
index 2d7aaa0e..e353bd16 100644
--- a/ArcFormats/NitroPlus/ArcNPK.cs
+++ b/ArcFormats/NitroPlus/ArcNPK.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.IO.Compression;
using System.Security.Cryptography;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -202,7 +201,7 @@ namespace GameRes.Formats.NitroPlus
public override ResourceOptions GetDefaultOptions ()
{
- return new Npk2Options { Key = GetKey (Settings.Default.NPKScheme) };
+ return new Npk2Options { Key = GetKey (Properties.Settings.Default.NPKScheme) };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/NitroPlus/ArcSteinsGate.cs b/ArcFormats/NitroPlus/ArcSteinsGate.cs
index 3998008c..441adf5a 100644
--- a/ArcFormats/NitroPlus/ArcSteinsGate.cs
+++ b/ArcFormats/NitroPlus/ArcSteinsGate.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using GameRes.Formats.Strings;
using GameRes.Utility;
-using GameRes.Formats.Properties;
namespace GameRes.Formats
{
@@ -138,7 +137,7 @@ namespace GameRes.Formats
public override ResourceOptions GetDefaultOptions ()
{
return new SteinsGateOptions {
- FileNameEncoding = GetEncoding (Settings.Default.SGFileNameEncoding),
+ FileNameEncoding = GetEncoding (Properties.Settings.Default.SGFileNameEncoding),
};
}
diff --git a/ArcFormats/NonColor/ArcDAT.cs b/ArcFormats/NonColor/ArcDAT.cs
index 0e225e2c..49540120 100644
--- a/ArcFormats/NonColor/ArcDAT.cs
+++ b/ArcFormats/NonColor/ArcDAT.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using GameRes.Compression;
using GameRes.Utility;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.NonColor
@@ -282,7 +281,7 @@ namespace GameRes.Formats.NonColor
public override ResourceOptions GetDefaultOptions ()
{
- return new ArcDatOptions { Scheme = Settings.Default.NCARCScheme };
+ return new ArcDatOptions { Scheme = Properties.Settings.Default.NCARCScheme };
}
public override object GetAccessWidget ()
diff --git a/ArcFormats/Properties/Settings.Designer.cs b/ArcFormats/Properties/Settings.Designer.cs
index 3f70c6e1..8360601c 100644
--- a/ArcFormats/Properties/Settings.Designer.cs
+++ b/ArcFormats/Properties/Settings.Designer.cs
@@ -681,5 +681,29 @@ namespace GameRes.Formats.Properties {
this["PCKTitle"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool RCTOverlayFrames {
+ get {
+ return ((bool)(this["RCTOverlayFrames"]));
+ }
+ set {
+ this["RCTOverlayFrames"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool RCTApplyMask {
+ get {
+ return ((bool)(this["RCTApplyMask"]));
+ }
+ set {
+ this["RCTApplyMask"] = value;
+ }
+ }
}
}
diff --git a/ArcFormats/Properties/Settings.settings b/ArcFormats/Properties/Settings.settings
index 9d00bf70..7dc1121d 100644
--- a/ArcFormats/Properties/Settings.settings
+++ b/ArcFormats/Properties/Settings.settings
@@ -167,5 +167,11 @@
+
+ True
+
+
+ True
+
\ No newline at end of file
diff --git a/ArcFormats/Qlie/ArcQLIE.cs b/ArcFormats/Qlie/ArcQLIE.cs
index 3c2d640b..6dd7921f 100644
--- a/ArcFormats/Qlie/ArcQLIE.cs
+++ b/ArcFormats/Qlie/ArcQLIE.cs
@@ -30,7 +30,6 @@ using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Linq;
using GameRes.Utility;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Formats.Borland;
@@ -281,7 +280,7 @@ namespace GameRes.Formats.Qlie
public override ResourceOptions GetDefaultOptions ()
{
return new QlieOptions {
- GameKeyData = GetKeyData (Settings.Default.QLIEScheme)
+ GameKeyData = GetKeyData (Properties.Settings.Default.QLIEScheme)
};
}
diff --git a/ArcFormats/RPM/ArcARC.cs b/ArcFormats/RPM/ArcARC.cs
index ddbd66b8..bb38e407 100644
--- a/ArcFormats/RPM/ArcARC.cs
+++ b/ArcFormats/RPM/ArcARC.cs
@@ -30,7 +30,6 @@ using System.IO;
using System.Text;
using GameRes.Compression;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
using GameRes.Utility;
namespace GameRes.Formats.Rpm
@@ -126,7 +125,7 @@ namespace GameRes.Formats.Rpm
public override ResourceOptions GetDefaultOptions ()
{
return new RpmOptions {
- Scheme = GetScheme (Settings.Default.RPMScheme),
+ Scheme = GetScheme (Properties.Settings.Default.RPMScheme),
};
}
diff --git a/ArcFormats/RenPy/ArcRPA.cs b/ArcFormats/RenPy/ArcRPA.cs
index c7d9c112..318ab1a6 100644
--- a/ArcFormats/RenPy/ArcRPA.cs
+++ b/ArcFormats/RenPy/ArcRPA.cs
@@ -33,7 +33,6 @@ using System.Numerics;
using System.IO;
using System.Text;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.RenPy
@@ -134,7 +133,7 @@ namespace GameRes.Formats.RenPy
public override ResourceOptions GetDefaultOptions ()
{
- return new RpaOptions { Key = Settings.Default.RPAKey };
+ return new RpaOptions { Key = Properties.Settings.Default.RPAKey };
}
public override object GetCreationWidget ()
diff --git a/ArcFormats/ResourceSettings.cs b/ArcFormats/ResourceSettings.cs
new file mode 100644
index 00000000..856a5e6e
--- /dev/null
+++ b/ArcFormats/ResourceSettings.cs
@@ -0,0 +1,15 @@
+//! \file ResourceSettings.cs
+//! \date 2018 Jan 08
+//! \brief Persistent resource settings implementation.
+//
+
+namespace GameRes.Formats
+{
+ internal class LocalResourceSetting : ResourceSettingBase
+ {
+ public override object Value {
+ get { return Properties.Settings.Default[Name]; }
+ set { Properties.Settings.Default[Name] = value; }
+ }
+ }
+}
diff --git a/ArcFormats/ScenePlayer/ImagePMP.cs b/ArcFormats/ScenePlayer/ImagePMP.cs
index 8bf1d408..0489985d 100644
--- a/ArcFormats/ScenePlayer/ImagePMP.cs
+++ b/ArcFormats/ScenePlayer/ImagePMP.cs
@@ -32,7 +32,7 @@ using GameRes.Utility;
namespace GameRes.Formats.ScenePlayer
{
[Export(typeof(ImageFormat))]
- public class PmpFormat : BmpFormat
+ public class PmpFormat : ImageFormat
{
public override string Tag { get { return "PMP"; } }
public override string Description { get { return "ScenePlayer compressed bitmap format"; } }
@@ -43,7 +43,7 @@ namespace GameRes.Formats.ScenePlayer
{
using (var output = new XoredStream (file, 0x21, true))
using (var zstream = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9))
- base.Write (zstream, image);
+ Bmp.Write (zstream, image);
}
public override ImageMetaData ReadMetaData (IBinaryStream stream)
@@ -55,7 +55,7 @@ namespace GameRes.Formats.ScenePlayer
using (var input = new XoredStream (stream.AsStream, 0x21, true))
using (var zstream = new ZLibStream (input, CompressionMode.Decompress))
using (var bmp = new BinaryStream (zstream, stream.Name))
- return base.ReadMetaData (bmp);
+ return Bmp.ReadMetaData (bmp);
}
public override ImageData Read (IBinaryStream stream, ImageMetaData info)
@@ -63,7 +63,7 @@ namespace GameRes.Formats.ScenePlayer
using (var input = new XoredStream (stream.AsStream, 0x21, true))
using (var zstream = new ZLibStream (input, CompressionMode.Decompress))
using (var bmp = new BinaryStream (zstream, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
}
}
diff --git a/ArcFormats/Selene/ArcKCAP.cs b/ArcFormats/Selene/ArcKCAP.cs
index b1193203..1558ea60 100644
--- a/ArcFormats/Selene/ArcKCAP.cs
+++ b/ArcFormats/Selene/ArcKCAP.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.Security.Cryptography;
using System.IO;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
namespace GameRes.Formats.Selene
{
@@ -145,7 +144,7 @@ namespace GameRes.Formats.Selene
public override ResourceOptions GetDefaultOptions ()
{
return new KcapOptions {
- PassPhrase = Settings.Default.KCAPPassPhrase,
+ PassPhrase = Properties.Settings.Default.KCAPPassPhrase,
};
}
diff --git a/ArcFormats/ShiinaRio/ArcWARC.cs b/ArcFormats/ShiinaRio/ArcWARC.cs
index aee85ad3..5c088056 100644
--- a/ArcFormats/ShiinaRio/ArcWARC.cs
+++ b/ArcFormats/ShiinaRio/ArcWARC.cs
@@ -29,7 +29,6 @@ using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -285,7 +284,7 @@ namespace GameRes.Formats.ShiinaRio // 椎名里緒
public override ResourceOptions GetDefaultOptions ()
{
return new WarOptions {
- Scheme = GetScheme (Settings.Default.WARCScheme),
+ Scheme = GetScheme (Properties.Settings.Default.WARCScheme),
};
}
diff --git a/ArcFormats/Tactics/ArcTactics.cs b/ArcFormats/Tactics/ArcTactics.cs
index 46837e58..76306d32 100644
--- a/ArcFormats/Tactics/ArcTactics.cs
+++ b/ArcFormats/Tactics/ArcTactics.cs
@@ -28,9 +28,7 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
-using System.Security.Cryptography;
using GameRes.Compression;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -384,10 +382,10 @@ namespace GameRes.Formats.Tactics
public override ResourceOptions GetDefaultOptions ()
{
- string title = Settings.Default.TacticsArcTitle;
+ string title = Properties.Settings.Default.TacticsArcTitle;
ArcScheme scheme = null;
- if (!KnownSchemes.TryGetValue (title, out scheme) && !string.IsNullOrEmpty (Settings.Default.TacticsArcPassword))
- scheme = new ArcScheme (Settings.Default.TacticsArcPassword);
+ if (!KnownSchemes.TryGetValue (title, out scheme) && !string.IsNullOrEmpty (Properties.Settings.Default.TacticsArcPassword))
+ scheme = new ArcScheme (Properties.Settings.Default.TacticsArcPassword);
return new TacticsOptions { Scheme = scheme };
}
diff --git a/ArcFormats/Tamamo/ArcPCK.cs b/ArcFormats/Tamamo/ArcPCK.cs
index 4be5b90e..ba325a47 100644
--- a/ArcFormats/Tamamo/ArcPCK.cs
+++ b/ArcFormats/Tamamo/ArcPCK.cs
@@ -28,12 +28,10 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
-using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using GameRes.Cryptography;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
namespace GameRes.Formats.Tamamo
@@ -209,7 +207,7 @@ namespace GameRes.Formats.Tamamo
public override ResourceOptions GetDefaultOptions ()
{
return new PckOptions {
- Key = GetKeyForTitle (Settings.Default.PCKTitle)
+ Key = GetKeyForTitle (Properties.Settings.Default.PCKTitle)
};
}
diff --git a/ArcFormats/Triangle/ImageIAF.cs b/ArcFormats/Triangle/ImageIAF.cs
index 50de3430..1ed187ba 100644
--- a/ArcFormats/Triangle/ImageIAF.cs
+++ b/ArcFormats/Triangle/ImageIAF.cs
@@ -41,7 +41,7 @@ namespace GameRes.Formats.Triangle
}
[Export(typeof(ImageFormat))]
- public class IafFormat : BmpFormat
+ public class IafFormat : ImageFormat
{
public override string Tag { get { return "IAF"; } }
public override string Description { get { return "Triangle compressed bitmap format"; } }
@@ -152,7 +152,7 @@ namespace GameRes.Formats.Triangle
}
}
using (var bmp = new BinMemoryStream (bitmap, stream.Name))
- return base.Read (bmp, info);
+ return Bmp.Read (bmp, info);
}
internal static byte[] UnpackBitmap (Stream stream, int pack_type, int packed_size, int unpacked_size)
diff --git a/ArcFormats/Will/ArcWILL.cs b/ArcFormats/Will/ArcWILL.cs
index 82f2598c..d2dd227f 100644
--- a/ArcFormats/Will/ArcWILL.cs
+++ b/ArcFormats/Will/ArcWILL.cs
@@ -28,7 +28,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
-using GameRes.Formats.Properties;
using GameRes.Formats.Strings;
using GameRes.Utility;
@@ -145,7 +144,7 @@ namespace GameRes.Formats.Will
public override ResourceOptions GetDefaultOptions ()
{
- return new ArcOptions { NameLength = Settings.Default.ARCNameLength };
+ return new ArcOptions { NameLength = Properties.Settings.Default.ARCNameLength };
}
public override object GetCreationWidget ()
diff --git a/ArcFormats/YuRis/ArcYPF.cs b/ArcFormats/YuRis/ArcYPF.cs
index ffd4ade9..45e95c45 100644
--- a/ArcFormats/YuRis/ArcYPF.cs
+++ b/ArcFormats/YuRis/ArcYPF.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
using System.ComponentModel.Composition;
using GameRes.Compression;
using GameRes.Formats.Strings;
-using GameRes.Formats.Properties;
using GameRes.Utility;
namespace GameRes.Formats.YuRis
@@ -159,9 +158,9 @@ namespace GameRes.Formats.YuRis
{
return new YpfOptions
{
- Key = Settings.Default.YPFKey,
- Version = Settings.Default.YPFVersion,
- Scheme = Settings.Default.YPFScheme,
+ Key = Properties.Settings.Default.YPFKey,
+ Version = Properties.Settings.Default.YPFVersion,
+ Scheme = Properties.Settings.Default.YPFScheme,
};
}
diff --git a/ArcFormats/app.config b/ArcFormats/app.config
index 1c6e13c2..95837a08 100644
--- a/ArcFormats/app.config
+++ b/ArcFormats/app.config
@@ -169,6 +169,12 @@
+
+ True
+
+
+ True
+