From 7909b5b64145ad5721753767446fc9c6a8f6bfe6 Mon Sep 17 00:00:00 2001 From: scientificworld Date: Sun, 4 Jan 2026 12:26:59 +0800 Subject: [PATCH] feat: EVB parsing improvement --- ArcFormats/Enigma/ArcEVB.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ArcFormats/Enigma/ArcEVB.cs b/ArcFormats/Enigma/ArcEVB.cs index 7fd06cdc..e117e293 100644 --- a/ArcFormats/Enigma/ArcEVB.cs +++ b/ArcFormats/Enigma/ArcEVB.cs @@ -32,6 +32,7 @@ using GameRes.Utility; namespace GameRes.Formats.Enigma { public enum NodeTypes { + AbsoluteDrive = 1, File = 2, Folder = 3, } @@ -83,10 +84,6 @@ namespace GameRes.Formats.Enigma { if (!entry.CheckPlacement(file.MaxOffset)) return null; dir.Add(entry); - while (counts.Count > 0 && counts[counts.Count - 1] == 0) { - counts.RemoveAt(counts.Count - 1); - names.RemoveAt(names.Count - 1); - } index_offset += 53; } else if (type == NodeTypes.Folder) { @@ -94,8 +91,17 @@ namespace GameRes.Formats.Enigma { names.Add(name); index_offset += 25; } + else if (type == NodeTypes.AbsoluteDrive) { + counts.Add(item_count); + names.Add(name[0].ToString()); + index_offset -= 4; + } else return null; + while (counts.Count > 0 && counts[counts.Count - 1] == 0) { + counts.RemoveAt(counts.Count - 1); + names.RemoveAt(names.Count - 1); + } } return new ArcFile(file, this, dir);