mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-29 06:14:13 +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)
|
||||
{
|
||||
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;
|
||||
// resolve some special cases first
|
||||
if (s_OggFormat.Value.Signature == signature)
|
||||
|
Loading…
x
Reference in New Issue
Block a user