mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(FPK): fine-tuning file type detection.
This commit is contained in:
@@ -39,6 +39,11 @@ namespace GameRes.Formats.Abel
|
|||||||
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 FpkOpener ()
|
||||||
|
{
|
||||||
|
ContainedFormats = new[] { "CBF", "WAV", "DAT/GENERIC" };
|
||||||
|
}
|
||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
int count = file.View.ReadInt32 (4);
|
int count = file.View.ReadInt32 (4);
|
||||||
@@ -56,7 +61,7 @@ namespace GameRes.Formats.Abel
|
|||||||
var name = names.ReadCString();
|
var name = names.ReadCString();
|
||||||
if (string.IsNullOrEmpty (name))
|
if (string.IsNullOrEmpty (name))
|
||||||
return null;
|
return null;
|
||||||
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
var entry = Create<Entry> (name);
|
||||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
entry.Offset = file.View.ReadUInt32 (index_offset);
|
||||||
entry.Size = file.View.ReadUInt32 (index_offset+4);
|
entry.Size = file.View.ReadUInt32 (index_offset+4);
|
||||||
if (!entry.CheckPlacement (file.MaxOffset))
|
if (!entry.CheckPlacement (file.MaxOffset))
|
||||||
@@ -68,4 +73,9 @@ namespace GameRes.Formats.Abel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Export(typeof(ResourceAlias))]
|
||||||
|
[ExportMetadata("Extension", "ALP")]
|
||||||
|
[ExportMetadata("Target", "DAT/GENERIC")]
|
||||||
|
public class AlpFormat : ResourceAlias { }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user