(AlfOpener.TryOpen): recognize "sys3ini.bin" index file.

This commit is contained in:
morkt 2015-09-21 21:48:44 +04:00
parent 5edbc9aa3f
commit c1614d3706
2 changed files with 19 additions and 9 deletions

View File

@ -41,16 +41,25 @@ namespace GameRes.Formats.Eushully
public override bool IsHierarchic { get { return false; } } public override bool IsHierarchic { get { return false; } }
public override bool CanCreate { 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) public override ArcFile TryOpen (ArcView file)
{ {
string ini_path = VFS.CombinePath (Path.GetDirectoryName (file.Name), "sys4ini.bin"); string dir_name = Path.GetDirectoryName (file.Name);
if (!VFS.FileExists (ini_path)) string file_name = Path.GetFileName (file.Name);
return null; foreach (var ini_name in IndexNames)
{
var dir = ReadIndex (ini_path, Path.GetFileName (file.Name)); string ini_path = VFS.CombinePath (dir_name, ini_name);
if (null == dir) if (VFS.FileExists (ini_path))
return null; {
return new ArcFile (file, this, dir); 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; Tuple<string, Dictionary<string, List<Entry>>> LastAccessedIndex;

View File

@ -387,9 +387,10 @@ Futamajo<br/>
<tr><td>*.pak</td><td><tt>PAK</tt></td><td>No</td><td>Debonosu Works</td><td> <tr><td>*.pak</td><td><tt>PAK</tt></td><td>No</td><td>Debonosu Works</td><td>
Gigai no Alruna<br/> Gigai no Alruna<br/>
</td></tr> </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/> Soukai no Oujo-tachi<br/>
</td></tr> </td></tr>
<tr class="odd"><td>*.agf</td><td><tt>ACGF</tt></td><td>No</td></tr>
</table> </table>
<p><a name="note-1" class="footnote">1</a> Non-encrypted only</p> <p><a name="note-1" class="footnote">1</a> Non-encrypted only</p>
</body> </body>