mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-26 13:50:21 -04:00
Support for SerializedFile version 22
This commit is contained in:
parent
cffe96b409
commit
509df42730
@ -7,7 +7,7 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
public class ObjectInfo
|
public class ObjectInfo
|
||||||
{
|
{
|
||||||
public uint byteStart;
|
public long byteStart;
|
||||||
public uint byteSize;
|
public uint byteSize;
|
||||||
public int typeID;
|
public int typeID;
|
||||||
public int classID;
|
public int classID;
|
||||||
|
@ -10,7 +10,7 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
public SerializedFile assetsFile;
|
public SerializedFile assetsFile;
|
||||||
public long m_PathID;
|
public long m_PathID;
|
||||||
public uint byteStart;
|
public long byteStart;
|
||||||
public uint byteSize;
|
public uint byteSize;
|
||||||
public ClassIDType type;
|
public ClassIDType type;
|
||||||
public SerializedType serializedType;
|
public SerializedType serializedType;
|
||||||
|
@ -55,6 +55,14 @@ namespace AssetStudio
|
|||||||
m_FileEndianess = (EndianType)reader.ReadByte();
|
m_FileEndianess = (EndianType)reader.ReadByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header.m_Version >= 22)
|
||||||
|
{
|
||||||
|
header.m_MetadataSize = reader.ReadUInt32();
|
||||||
|
header.m_FileSize = reader.ReadInt64();
|
||||||
|
header.m_DataOffset = reader.ReadInt64();
|
||||||
|
reader.ReadInt64(); // unknown
|
||||||
|
}
|
||||||
|
|
||||||
//ReadMetadata
|
//ReadMetadata
|
||||||
if (m_FileEndianess == EndianType.LittleEndian)
|
if (m_FileEndianess == EndianType.LittleEndian)
|
||||||
{
|
{
|
||||||
@ -106,7 +114,12 @@ namespace AssetStudio
|
|||||||
reader.AlignStream();
|
reader.AlignStream();
|
||||||
objectInfo.m_PathID = reader.ReadInt64();
|
objectInfo.m_PathID = reader.ReadInt64();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header.m_Version >= 22)
|
||||||
|
objectInfo.byteStart = reader.ReadInt64();
|
||||||
|
else
|
||||||
objectInfo.byteStart = reader.ReadUInt32();
|
objectInfo.byteStart = reader.ReadUInt32();
|
||||||
|
|
||||||
objectInfo.byteStart += header.m_DataOffset;
|
objectInfo.byteStart += header.m_DataOffset;
|
||||||
objectInfo.byteSize = reader.ReadUInt32();
|
objectInfo.byteSize = reader.ReadUInt32();
|
||||||
objectInfo.typeID = reader.ReadInt32();
|
objectInfo.typeID = reader.ReadInt32();
|
||||||
|
@ -8,9 +8,9 @@ namespace AssetStudio
|
|||||||
public class SerializedFileHeader
|
public class SerializedFileHeader
|
||||||
{
|
{
|
||||||
public uint m_MetadataSize;
|
public uint m_MetadataSize;
|
||||||
public uint m_FileSize;
|
public long m_FileSize;
|
||||||
public uint m_Version;
|
public uint m_Version;
|
||||||
public uint m_DataOffset;
|
public long m_DataOffset;
|
||||||
public byte m_Endianess;
|
public byte m_Endianess;
|
||||||
public byte[] m_Reserved;
|
public byte[] m_Reserved;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user