(XP3): added ContainedFormats property.

This commit is contained in:
morkt 2018-12-19 03:20:16 +04:00
parent 479fd34ca3
commit 4be7aa5bee

View File

@ -89,6 +89,7 @@ namespace GameRes.Formats.KiriKiri
public Xp3Opener () public Xp3Opener ()
{ {
Signatures = new uint[] { 0x0d335058, 0 }; Signatures = new uint[] { 0x0d335058, 0 };
ContainedFormats = new[] { "TLG", "BMP", "PNG", "JPEG", "OGG", "WAV", "TXT" };
} }
static readonly byte[] s_xp3_header = { static readonly byte[] s_xp3_header = {
@ -202,7 +203,7 @@ namespace GameRes.Formats.KiriKiri
goto NextEntry; goto NextEntry;
} }
entry.Name = name; entry.Name = name;
entry.Type = FormatCatalog.Instance.GetTypeFromName (name); entry.Type = FormatCatalog.Instance.GetTypeFromName (name, ContainedFormats);
entry.IsEncrypted = !(entry.Cipher is NoCrypt) entry.IsEncrypted = !(entry.Cipher is NoCrypt)
&& !(entry.Cipher.StartupTjsNotEncrypted && "startup.tjs" == name); && !(entry.Cipher.StartupTjsNotEncrypted && "startup.tjs" == name);
break; break;
@ -888,4 +889,9 @@ NextEntry:
} }
} }
} }
[Export(typeof(ResourceAlias))]
[ExportMetadata("Extension", "ANM")]
[ExportMetadata("Target", "TXT")]
public class AnmFormat : ResourceAlias { }
} }