Skip to content

Commit

Permalink
(AlfOpener.TryOpen): recognize "sys3ini.bin" index file.
Browse files Browse the repository at this point in the history
  • Loading branch information
morkt committed Sep 21, 2015
1 parent 5edbc9a commit c1614d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
25 changes: 17 additions & 8 deletions ArcFormats/Eushully/ArcALF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, Dictionary<string, List<Entry>>> LastAccessedIndex;
Expand Down
3 changes: 2 additions & 1 deletion supported.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,10 @@
<tr><td>*.pak</td><td><tt>PAK</tt></td><td>No</td><td>Debonosu Works</td><td>
Gigai no Alruna<br/>
</td></tr>
<tr class="odd"><td>*.alf<br/>sys4ini.bin</td><td><tt>S4IC</tt></td><td>No</td><td rowspan="2">Eushully</td><td rowspan="2">
<tr class="odd"><td>sys4ini.bin<br/>sys3ini.bin<br/>*.alf</td><td><tt>S4IC</tt><br/><tt>S3IC</tt></td><td>No</td><td rowspan="2">Eushully</td><td rowspan="2">
Soukai no Oujo-tachi<br/>
</td></tr>
<tr class="odd"><td>*.agf</td><td><tt>ACGF</tt></td><td>No</td></tr>
</table>
<p><a name="note-1" class="footnote">1</a> Non-encrypted only</p>
</body>
Expand Down

0 comments on commit c1614d3

Please sign in to comment.