From c93d8c3076b5171f17538d9d01150c6c35eb9e9b Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 15 Dec 2015 00:48:21 +0400 Subject: [PATCH] DET archives are hierarchic. --- ArcFormats/uGOS/ArcDET.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ArcFormats/uGOS/ArcDET.cs b/ArcFormats/uGOS/ArcDET.cs index 4492028b..40187550 100644 --- a/ArcFormats/uGOS/ArcDET.cs +++ b/ArcFormats/uGOS/ArcDET.cs @@ -37,7 +37,7 @@ namespace GameRes.Formats.uGOS public override string Tag { get { return "DET"; } } public override string Description { get { return "μ-GameOperationSystem resource archive"; } } public override uint Signature { get { return 0; } } - public override bool IsHierarchic { get { return false; } } + public override bool IsHierarchic { get { return true; } } public override bool CanCreate { get { return false; } } public override ArcFile TryOpen (ArcView file) @@ -51,12 +51,11 @@ namespace GameRes.Formats.uGOS using (var nme = VFS.OpenView (name_file)) using (var idx = VFS.OpenView (index_file)) { - var name_table = new byte[nme.MaxOffset]; - nme.View.Read (0, name_table, 0, (uint)name_table.Length); - uint idx_offset = 0; int count = (int)(idx.MaxOffset / 0x14); if (!IsSaneCount (count)) return null; + uint idx_offset = 0; + var name_table = nme.View.ReadBytes (0, (uint)nme.MaxOffset); var dir = new List (count); for (int i = 0; i < count; ++i) {