mirror of
https://github.com/lifegpc/GARbro.git
synced 2026-07-08 01:31:41 +08:00
(IResource.CanWrite): new property.
(ArchiveFormat.CanCreate): renamed to CanWrite.
This commit is contained in:
@@ -105,7 +105,7 @@ namespace GameRes.Formats.NitroPlus
|
||||
public override string Description { get { return arcStrings.NPADescription; } }
|
||||
public override uint Signature { get { return 0x0141504e; } } // NPA\x01
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanCreate { get { return true; } }
|
||||
public override bool CanWrite { get { return true; } }
|
||||
|
||||
public static Dictionary<string, EncryptionScheme> KnownSchemes = new Dictionary<string, EncryptionScheme>();
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace GameRes.Formats.NitroPlus
|
||||
public override string Description { get { return "Mware engine resource archive"; } }
|
||||
public override uint Signature { get { return 0x324B504E; } } // 'NPK2'
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanCreate { get { return true; } }
|
||||
public override bool CanWrite { get { return true; } }
|
||||
|
||||
public static Dictionary<string, byte[]> KnownKeys = new Dictionary<string, byte[]>();
|
||||
|
||||
@@ -134,14 +134,14 @@ namespace GameRes.Formats.NitroPlus
|
||||
|
||||
List<Entry> ReadIndex (BinaryReader index, int count, long max_offset)
|
||||
{
|
||||
var name_buffer = new byte[0x80];
|
||||
var name_buffer = new byte[0x104];
|
||||
var dir = new List<Entry> (count);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
index.ReadByte();
|
||||
int name_length = index.ReadUInt16();
|
||||
if (name_length > name_buffer.Length)
|
||||
name_buffer = new byte[name_length];
|
||||
if (0 == name_length || name_length > name_buffer.Length)
|
||||
return null;
|
||||
index.Read (name_buffer, 0, name_length);
|
||||
var name = Encodings.cp932.GetString (name_buffer, 0, name_length);
|
||||
var entry = FormatCatalog.Instance.Create<NpkEntry> (name);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace GameRes.Formats.NitroPlus
|
||||
public override string Description { get { return "Nitro+ resource archive"; } }
|
||||
public override uint Signature { get { return 0x03; } }
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanCreate { get { return false; } }
|
||||
public override bool CanWrite { get { return false; } }
|
||||
|
||||
public PakOpener ()
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace GameRes.Formats.Magi
|
||||
public override string Description { get { return "MAGI resource archive"; } }
|
||||
public override uint Signature { get { return 3; } }
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanCreate { get { return false; } }
|
||||
public override bool CanWrite { get { return false; } }
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
|
||||
@@ -42,11 +42,11 @@ namespace GameRes.Formats
|
||||
[Export(typeof(ArchiveFormat))]
|
||||
public class NpaSteinsGateOpener : ArchiveFormat
|
||||
{
|
||||
public override string Tag { get { return "NPA-SG"; } }
|
||||
public override string Tag { get { return "NPA-SG"; } }
|
||||
public override string Description { get { return arcStrings.NPASteinsGateDescription; } }
|
||||
public override uint Signature { get { return 0; } }
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanCreate { get { return true; } }
|
||||
public override uint Signature { get { return 0; } }
|
||||
public override bool IsHierarchic { get { return true; } }
|
||||
public override bool CanWrite { get { return true; } }
|
||||
|
||||
public NpaSteinsGateOpener ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user