mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(MblOpener): added static shortcut to PrsFormat.
This commit is contained in:
parent
5830c0d8a2
commit
19b8c0015c
@ -75,6 +75,8 @@ namespace GameRes.Formats.Marble
|
|||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static readonly Lazy<ImageFormat> PrsFormat = new Lazy<ImageFormat> (() => FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "PRS"));
|
||||||
|
|
||||||
private ArcFile ReadIndex (ArcView file, int count, uint filename_len, uint index_offset)
|
private ArcFile ReadIndex (ArcView file, int count, uint filename_len, uint index_offset)
|
||||||
{
|
{
|
||||||
uint index_size = (8u + filename_len) * (uint)count;
|
uint index_size = (8u + filename_len) * (uint)count;
|
||||||
@ -114,8 +116,11 @@ namespace GameRes.Formats.Marble
|
|||||||
entry = new AutoEntry (name, () => {
|
entry = new AutoEntry (name, () => {
|
||||||
uint signature = file.View.ReadUInt32 (offset);
|
uint signature = file.View.ReadUInt32 (offset);
|
||||||
if (0x4259 == (0xffff & signature))
|
if (0x4259 == (0xffff & signature))
|
||||||
return FormatCatalog.Instance.ImageFormats.FirstOrDefault (x => x.Tag == "PRS");
|
return PrsFormat.Value;
|
||||||
return FormatCatalog.Instance.LookupSignature (signature).FirstOrDefault();
|
else if (0 != signature)
|
||||||
|
return FormatCatalog.Instance.LookupSignature (signature).FirstOrDefault();
|
||||||
|
else
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user