From 6553d73230b5e242ff80e9a4b3c140da84c54b40 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 12 Nov 2017 10:05:02 +0400 Subject: [PATCH] (MBF): recognize 'MBF1' archives. --- ArcFormats/Tanaka/ArcMBF.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ArcFormats/Tanaka/ArcMBF.cs b/ArcFormats/Tanaka/ArcMBF.cs index e4bd3214..69ff240e 100644 --- a/ArcFormats/Tanaka/ArcMBF.cs +++ b/ArcFormats/Tanaka/ArcMBF.cs @@ -37,6 +37,11 @@ namespace GameRes.Formats.Will public override bool IsHierarchic { get { return false; } } public override bool CanWrite { get { return false; } } + public MbfOpener () + { + Signatures = new uint[] { 0x3046424D, 0x3146424D }; + } + public override ArcFile TryOpen (ArcView file) { int count = file.View.ReadInt32 (4); @@ -64,13 +69,18 @@ namespace GameRes.Formats.Will } foreach (var entry in dir) { - if (!file.View.AsciiEqual (data_offset, "BC")) + if (file.View.AsciiEqual (data_offset, "BC")) + { + entry.Size = file.View.ReadUInt32 (data_offset+2); + entry.Type = "image"; + } + else if (file.View.AsciiEqual (data_offset, "$SEQ")) + entry.Size = file.View.ReadUInt32 (data_offset+4); + else return null; entry.Offset = data_offset; - entry.Size = file.View.ReadUInt32 (data_offset+2); if (!entry.CheckPlacement (file.MaxOffset)) return null; - entry.Type = "image"; data_offset += entry.Size; } return new ArcFile (file, this, dir);