From 503855b55b0e3204b1421eca9c61c0fd5fcb2aee Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 3 Sep 2015 07:13:12 +0400 Subject: [PATCH] recognize more of Nexas archives. --- ArcFormats/ArcNexas.cs | 11 +++++++++-- supported.html | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ArcFormats/ArcNexas.cs b/ArcFormats/ArcNexas.cs index be9588ed..2eb825c5 100644 --- a/ArcFormats/ArcNexas.cs +++ b/ArcFormats/ArcNexas.cs @@ -64,10 +64,17 @@ namespace GameRes.Formats.NeXAS public override bool IsHierarchic { get { return false; } } public override bool CanCreate { get { return false; } } + public PacOpener () + { + Signatures = new uint[] { 0x00434150, 0 }; + } + public override ArcFile TryOpen (ArcView file) { + if (!file.View.AsciiEqual (0, "PAC") || 'K' == file.View.ReadByte (3)) + return null; int count = file.View.ReadInt32 (4); - if (count <= 0 || count > 0xfffff) + if (!IsSaneCount (count)) return null; int pack_type = file.View.ReadInt32 (8); uint index_size = file.View.ReadUInt32 (file.MaxOffset-4); @@ -95,7 +102,7 @@ namespace GameRes.Formats.NeXAS }; if (!entry.CheckPlacement (file.MaxOffset)) return null; - entry.IsPacked = pack_type != 0; + entry.IsPacked = pack_type != 0 && (pack_type != 4 || entry.Size != entry.UnpackedSize); dir.Add (entry); } if (0 == pack_type) diff --git a/supported.html b/supported.html index 61066e3f..9994c6c8 100644 --- a/supported.html +++ b/supported.html @@ -113,7 +113,11 @@ Binary Pot
Tsukihime
Umineko
-*.pacPACNoNeXASMaji de Watashi ni Koishinasai! +*.pacPACNoNeXAS +Baldr Sky DiveX
+Jinki Extend Re:Vision
+Maji de Watashi ni Koishinasai!
+ *.pacPAC1NoRiddle Soft Hana Hiraku
Iinari