mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
(AutoEntry.DetectFileType): changed arguments.
This commit is contained in:
parent
9b6c4ddff0
commit
6d508f8595
@ -57,12 +57,11 @@ namespace GameRes.Formats
|
|||||||
|
|
||||||
public static AutoEntry Create (ArcView file, long offset, string base_name)
|
public static AutoEntry Create (ArcView file, long offset, string base_name)
|
||||||
{
|
{
|
||||||
return new AutoEntry (base_name, () => DetectFileType (file, offset)) { Offset = offset };
|
return new AutoEntry (base_name, () => DetectFileType (file.View.ReadUInt32 (offset))) { Offset = offset };
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IResource DetectFileType (ArcView file, long offset)
|
public static IResource DetectFileType (uint signature)
|
||||||
{
|
{
|
||||||
uint signature = file.View.ReadUInt32 (offset);
|
|
||||||
if (0 == signature) return null;
|
if (0 == signature) return null;
|
||||||
// resolve some special cases first
|
// resolve some special cases first
|
||||||
if (s_OggFormat.Value.Signature == signature)
|
if (s_OggFormat.Value.Signature == signature)
|
||||||
|
Loading…
Reference in New Issue
Block a user