mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +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,
|
Offset = input.Position,
|
||||||
Size = size,
|
Size = size,
|
||||||
};
|
};
|
||||||
|
if (name.HasAnyOfExtensions ("jpg", "png"))
|
||||||
|
entry.Type = "image";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 128: // Font
|
case 128: // Font
|
||||||
|
@ -45,7 +45,7 @@ namespace GameRes.Formats.Unity
|
|||||||
|
|
||||||
public UnityFSOpener ()
|
public UnityFSOpener ()
|
||||||
{
|
{
|
||||||
Extensions = new string[] { "" };
|
Extensions = new string[] { "", "unity3d" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
@ -180,7 +180,7 @@ namespace GameRes.Formats.Unity
|
|||||||
public uint UnpackedSize;
|
public uint UnpackedSize;
|
||||||
public int Compression;
|
public int Compression;
|
||||||
|
|
||||||
public bool IsCompressed { get { return Compression != 0; } }
|
public bool IsCompressed { get { return (Compression & 0x3F) != 0; } }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class AssetDeserializer
|
internal class AssetDeserializer
|
||||||
@ -373,6 +373,11 @@ namespace GameRes.Formats.Unity
|
|||||||
uint signature = reader.ReadUInt32();
|
uint signature = reader.ReadUInt32();
|
||||||
if (0x0D15F641 == signature)
|
if (0x0D15F641 == signature)
|
||||||
entry.Type = "image";
|
entry.Type = "image";
|
||||||
|
else if (0x474E5089 == signature)
|
||||||
|
{
|
||||||
|
entry.Type = "image";
|
||||||
|
entry.IsEncrypted = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user