mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(ISA): moved to Ism folder.
This commit is contained in:
@@ -37,6 +37,11 @@ namespace GameRes.Formats.ISM
|
|||||||
public override bool IsHierarchic { get { return false; } }
|
public override bool IsHierarchic { get { return false; } }
|
||||||
public override bool CanWrite { get { return false; } }
|
public override bool CanWrite { get { return false; } }
|
||||||
|
|
||||||
|
public IsaOpener ()
|
||||||
|
{
|
||||||
|
ContainedFormats = new[] { "ISG", "PNG/ISM", "OGG", };
|
||||||
|
}
|
||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
if (!file.View.AsciiEqual (4, "ARCHIVED"))
|
if (!file.View.AsciiEqual (4, "ARCHIVED"))
|
||||||
@@ -87,6 +92,13 @@ namespace GameRes.Formats.ISM
|
|||||||
entry.Size = m_file.View.ReadUInt32 (index_offset+8);
|
entry.Size = m_file.View.ReadUInt32 (index_offset+8);
|
||||||
if (!entry.CheckPlacement (m_file.MaxOffset))
|
if (!entry.CheckPlacement (m_file.MaxOffset))
|
||||||
return null;
|
return null;
|
||||||
|
if (string.IsNullOrEmpty (entry.Type) && name_length < 0x20) // try to fix truncated extension
|
||||||
|
{
|
||||||
|
if (name.EndsWith (".OG"))
|
||||||
|
entry.Type = "audio";
|
||||||
|
else if (name.EndsWith (".PN"))
|
||||||
|
entry.Type = "image";
|
||||||
|
}
|
||||||
m_dir.Add (entry);
|
m_dir.Add (entry);
|
||||||
index_offset += record_length;
|
index_offset += record_length;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user