mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(AfaOpener): check archive version.
This commit is contained in:
parent
fda4f26845
commit
0a73f4f96e
@ -46,6 +46,7 @@ namespace GameRes.Formats.AliceSoft
|
|||||||
return null;
|
return null;
|
||||||
if (!file.View.AsciiEqual (0x1C, "INFO"))
|
if (!file.View.AsciiEqual (0x1C, "INFO"))
|
||||||
return null;
|
return null;
|
||||||
|
int version = file.View.ReadInt32 (0x10);
|
||||||
long base_offset = file.View.ReadUInt32 (0x18);
|
long base_offset = file.View.ReadUInt32 (0x18);
|
||||||
uint packed_size = file.View.ReadUInt32 (0x20);
|
uint packed_size = file.View.ReadUInt32 (0x20);
|
||||||
int unpacked_size = file.View.ReadInt32 (0x24);
|
int unpacked_size = file.View.ReadInt32 (0x24);
|
||||||
@ -73,6 +74,7 @@ namespace GameRes.Formats.AliceSoft
|
|||||||
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
||||||
index.ReadInt32();
|
index.ReadInt32();
|
||||||
index.ReadInt32();
|
index.ReadInt32();
|
||||||
|
if (version < 2)
|
||||||
index.ReadInt32();
|
index.ReadInt32();
|
||||||
entry.Offset = index.ReadUInt32() + base_offset;
|
entry.Offset = index.ReadUInt32() + base_offset;
|
||||||
entry.Size = index.ReadUInt32();
|
entry.Size = index.ReadUInt32();
|
||||||
|
Loading…
Reference in New Issue
Block a user