Пример #1
0
        public void Read(X360Reader reader)
        {
            long ftexBaseOffset = reader.BaseStream.Position;
            int magicNumber = reader.ReadInt32(); // FTEX
            int size = reader.ReadInt32();
            Hash = reader.ReadUInt64();
            int count = reader.ReadInt32();
            int unknown1 = reader.ReadInt32(); // 0
            int unknown2 = reader.ReadInt32(); // 0
            int unknown3 = reader.ReadInt32(); // 0

            Entries = new List<PftxsFtexsFileEntry>();
            for (int i = 0; i < count; i++)
            {
                PftxsFtexsFileEntry entry = new PftxsFtexsFileEntry();
                entry.Read(reader);

                string name;
                Hashing.TryGetFileNameFromHash(entry.Hash, out name, false);
                entry.FilePath = Hashing.NormalizeFilePath(name);
                Entries.Add(entry);
            }

            foreach (var entry in Entries)
            {
                reader.BaseStream.Position = ftexBaseOffset + entry.Offset;
                entry.Data = reader.ReadBytes(entry.Size);
            }
        }
Пример #2
0
 public void Read(X360Reader reader)
 {
     Hash = reader.ReadUInt64();
     Offset = reader.ReadInt32();
     Size = reader.ReadInt32();
 }
Пример #3
0
 private void Read(Stream input)
 {
     X360Reader reader = new X360Reader(input, Encoding.Default, true, true);
     Hash = reader.ReadUInt64();
 }
Пример #4
0
 private void Read(X360Reader reader)
 {
     DataOffset = reader.ReadInt64();
     DataSize = reader.ReadUInt64();
     FpkString fileName = FpkString.ReadFpkString(reader);
     Md5Hash = reader.ReadBytes(16);
     fileName.ResolveString(Md5Hash);
     FilePathFpkString = fileName;
 }