(BND): added alias for scripts.

This commit is contained in:
morkt 2018-11-17 00:45:14 +04:00
parent abe4670b9f
commit 34ca844f39

View File

@ -28,6 +28,7 @@ using System.ComponentModel.Composition;
using System.IO;
// [010309][Tetratech] Kyouiku Jisshuu 2 ~Joshikousei Maniacs~
// [031128][Kogado Studio] 指極星
namespace GameRes.Formats.Tetratech
{
@ -40,6 +41,11 @@ namespace GameRes.Formats.Tetratech
public override bool IsHierarchic { get { return false; } }
public override bool CanWrite { get { return false; } }
public BndOpener ()
{
ContainedFormats = new[] { "BMP", "WAV", "SCR" };
}
public override ArcFile TryOpen (ArcView file)
{
if (!file.Name.HasExtension (".BND"))
@ -56,7 +62,7 @@ namespace GameRes.Formats.Tetratech
for (int i = 0; i < count; ++i)
{
var name = idx.ReadCString (0x10);
var entry = FormatCatalog.Instance.Create<Entry> (name);
var entry = Create<Entry> (name);
entry.Size = idx.ReadUInt32();
entry.Offset = idx.ReadUInt32();
if (!entry.CheckPlacement (file.MaxOffset))
@ -67,4 +73,9 @@ namespace GameRes.Formats.Tetratech
}
}
}
[Export(typeof(ResourceAlias))]
[ExportMetadata("Extension", "SCB")]
[ExportMetadata("Target", "SCR")]
public class ScbFormat : ResourceAlias { }
}