mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(ResourcesAsset): constructor argument is filename.
This commit is contained in:
parent
88c8cf96a3
commit
ddf2996774
@ -135,7 +135,7 @@ namespace GameRes.Formats.Unity.Gx4Lib
|
||||
long base_pos = asset_pos + header_size - 4;
|
||||
|
||||
input.Position = base_pos;
|
||||
var index = new ResourcesAssetsDeserializer (arc.File);
|
||||
var index = new ResourcesAssetsDeserializer (arc.File.Name);
|
||||
var dir = index.Parse (input, base_pos);
|
||||
if (null == dir || 0 == dir.Count)
|
||||
return base.OpenEntry (arc, entry);;
|
||||
|
@ -33,9 +33,9 @@ namespace GameRes.Formats.Unity
|
||||
string m_res_name;
|
||||
Dictionary<string, BundleEntry> m_bundles;
|
||||
|
||||
public ResourcesAssetsDeserializer (ArcView file)
|
||||
public ResourcesAssetsDeserializer (string arc_name)
|
||||
{
|
||||
m_res_name = file.Name;
|
||||
m_res_name = arc_name;
|
||||
}
|
||||
|
||||
public List<Entry> Parse (AssetReader input, long base_offset = 0)
|
||||
@ -50,8 +50,11 @@ namespace GameRes.Formats.Unity
|
||||
{
|
||||
input.Position = obj.Offset + base_offset;
|
||||
AssetEntry entry = null;
|
||||
switch (obj.TypeId)
|
||||
int id = obj.TypeId > 0 ? obj.TypeId : obj.ClassId;
|
||||
switch (id)
|
||||
{
|
||||
case 48: // Shader
|
||||
case 114: // MonoBehaviour
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -126,7 +129,6 @@ namespace GameRes.Formats.Unity
|
||||
entry.Type = "image";
|
||||
break;
|
||||
}
|
||||
case 114: // MonoBehaviour
|
||||
case 128: // Font
|
||||
{
|
||||
entry = new AssetEntry {
|
||||
|
Loading…
Reference in New Issue
Block a user