Exemplo n.º 1
0
 public ulong Read(AssetsFileReader reader, ulong filePos)
 {
     reader.bigEndian = false;
     header           = reader.ReadStringLength(4);
     if (header != "cldb")
     {
         return(reader.Position);
     }
     fileVersion = reader.ReadByte();
     if (fileVersion != 3)
     {
         return(reader.Position);
     }
     compressionType = reader.ReadByte();
     if (compressionType != 0)
     {
         return(reader.Position);
     }
     compressedSize    = reader.ReadUInt32();
     uncompressedSize  = reader.ReadUInt32();
     unityVersionCount = reader.ReadByte();
     pUnityVersions    = new string[unityVersionCount];
     for (int i = 0; i < unityVersionCount; i++)
     {
         pUnityVersions[i] = reader.ReadCountString();
     }
     stringTableLen = reader.ReadUInt32();
     stringTablePos = reader.ReadUInt32();
     return(reader.Position);
 }
 public void Read(AssetsFileReader reader)
 {
     fromStringTable       = true;
     str.stringTableOffset = reader.ReadUInt32();
     if (str.stringTableOffset != 0xFFFFFFFF)
     {
         fromStringTable = true;
     }
     else
     {
         //untested, probably wrong
         fromStringTable = false;
         str.@string     = reader.ReadCountString();
     }
 }
Exemplo n.º 3
0
 public ulong Read(AssetsFileReader reader, ulong filePos)
 {
     fromStringTable       = true;
     str.stringTableOffset = reader.ReadUInt32();
     if (str.stringTableOffset != 0xFFFFFFFF) //total guess haha, havent messed with inline strings much
     {
         fromStringTable = true;
     }
     else
     {
         //untested, probably wrong
         fromStringTable = false;
         str.@string     = reader.ReadCountString(); //this may be different
     }
     return(reader.Position);
 }
Exemplo n.º 4
0
 public ulong Read(AssetsFileReader reader, ulong filePos)
 {
     fromStringTable       = true;
     str.stringTableOffset = reader.ReadUInt32();
     if (str.stringTableOffset != 0xFFFFFFFF)
     {
         fromStringTable = true;
     }
     else
     {
         //untested, probably wrong
         fromStringTable = false;
         str.@string     = reader.ReadCountString();
     }
     return(reader.Position);
 }