From c1614d3706d2038b4b862caf2b94c458178fb0f4 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 21 Sep 2015 21:48:44 +0400 Subject: [PATCH] (AlfOpener.TryOpen): recognize "sys3ini.bin" index file. --- ArcFormats/Eushully/ArcALF.cs | 25 +++++++++++++++++-------- supported.html | 3 ++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ArcFormats/Eushully/ArcALF.cs b/ArcFormats/Eushully/ArcALF.cs index 2b5263c0..7b2374c7 100644 --- a/ArcFormats/Eushully/ArcALF.cs +++ b/ArcFormats/Eushully/ArcALF.cs @@ -41,16 +41,25 @@ public class AlfOpener : ArchiveFormat public override bool IsHierarchic { get { return false; } } public override bool CanCreate { get { return false; } } + static string[] IndexNames = new string[] { "sys4ini.bin", "sys3ini.bin" }; + public override ArcFile TryOpen (ArcView file) { - string ini_path = VFS.CombinePath (Path.GetDirectoryName (file.Name), "sys4ini.bin"); - if (!VFS.FileExists (ini_path)) - return null; - - var dir = ReadIndex (ini_path, Path.GetFileName (file.Name)); - if (null == dir) - return null; - return new ArcFile (file, this, dir); + string dir_name = Path.GetDirectoryName (file.Name); + string file_name = Path.GetFileName (file.Name); + foreach (var ini_name in IndexNames) + { + string ini_path = VFS.CombinePath (dir_name, ini_name); + if (VFS.FileExists (ini_path)) + { + var dir = ReadIndex (ini_path, file_name); + if (null != dir) + return new ArcFile (file, this, dir); + if (LastAccessedIndex != null) + break; + } + } + return null; } Tuple>> LastAccessedIndex; diff --git a/supported.html b/supported.html index 51a6d510..6db5e3b1 100644 --- a/supported.html +++ b/supported.html @@ -387,9 +387,10 @@ *.pakPAKNoDebonosu Works Gigai no Alruna
-*.alf
sys4ini.binS4ICNoEushully +sys4ini.bin
sys3ini.bin
*.alfS4IC
S3ICNoEushully Soukai no Oujo-tachi
+*.agfACGFNo

1 Non-encrypted only