mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 12:39:16 +08:00
(Unity): fixed compressed segments detection.
better recognize image entries.
This commit is contained in:
parent
6c0f4657ac
commit
a90d3ee9b0
@ -203,6 +203,8 @@ namespace GameRes.Formats.Unity
|
||||
Offset = input.Position,
|
||||
Size = size,
|
||||
};
|
||||
if (name.HasAnyOfExtensions ("jpg", "png"))
|
||||
entry.Type = "image";
|
||||
break;
|
||||
}
|
||||
case 128: // Font
|
||||
|
@ -45,7 +45,7 @@ namespace GameRes.Formats.Unity
|
||||
|
||||
public UnityFSOpener ()
|
||||
{
|
||||
Extensions = new string[] { "" };
|
||||
Extensions = new string[] { "", "unity3d" };
|
||||
}
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
@ -180,7 +180,7 @@ namespace GameRes.Formats.Unity
|
||||
public uint UnpackedSize;
|
||||
public int Compression;
|
||||
|
||||
public bool IsCompressed { get { return Compression != 0; } }
|
||||
public bool IsCompressed { get { return (Compression & 0x3F) != 0; } }
|
||||
}
|
||||
|
||||
internal class AssetDeserializer
|
||||
@ -373,6 +373,11 @@ namespace GameRes.Formats.Unity
|
||||
uint signature = reader.ReadUInt32();
|
||||
if (0x0D15F641 == signature)
|
||||
entry.Type = "image";
|
||||
else if (0x474E5089 == signature)
|
||||
{
|
||||
entry.Type = "image";
|
||||
entry.IsEncrypted = false;
|
||||
}
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user