From c2b8285aa25b2b377d9cf6881a3de6aaadb6a761 Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 23 Jan 2019 06:01:02 +0400 Subject: [PATCH] (PCK): set ContainedFormats property. --- ArcFormats/Tamamo/ArcPCK.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ArcFormats/Tamamo/ArcPCK.cs b/ArcFormats/Tamamo/ArcPCK.cs index 1930ece7..eaf0e4bc 100644 --- a/ArcFormats/Tamamo/ArcPCK.cs +++ b/ArcFormats/Tamamo/ArcPCK.cs @@ -68,6 +68,11 @@ namespace GameRes.Formats.Tamamo public override bool IsHierarchic { get { return false; } } public override bool CanWrite { get { return false; } } + public PckOpener () + { + ContainedFormats = new[] { "PNG", "DDS", "OGG", "WAV", "TXT", "DAT/GENERIC" }; + } + public override ArcFile TryOpen (ArcView file) { if (!file.View.AsciiEqual (4, "_FILE001")) @@ -99,7 +104,7 @@ namespace GameRes.Formats.Tamamo pos = name_end+1; uint enc_size = index.ToUInt32 (pos); pos += 4; - var entry = FormatCatalog.Instance.Create (name); + var entry = Create (name); entry.Offset = data_offset; entry.Size = enc_size; entry.UnpackedSize = size; @@ -257,4 +262,9 @@ namespace GameRes.Formats.Tamamo return key; } } + + [Export(typeof(ResourceAlias))] + [ExportMetadata("Extension", "TMX")] + [ExportMetadata("Target", "DAT/GENERIC")] + public class TmxFormat : ResourceAlias { } }