Ejemplo n.º 1
0
 public BA2FileEntry(Ba2Reader ba2Reader, int index, BinaryReader reader)
 {
     _index     = index;
     _bsa       = ba2Reader;
     _nameHash  = reader.ReadUInt32();
     Path       = _nameHash.ToString("X");
     _extension = Encoding.UTF8.GetString(reader.ReadBytes(4));
     _dirHash   = reader.ReadUInt32();
     _flags     = reader.ReadUInt32();
     _offset    = reader.ReadUInt64();
     _size      = reader.ReadUInt32();
     _realSize  = reader.ReadUInt32();
     _align     = reader.ReadUInt32();
 }
Ejemplo n.º 2
0
        public BA2DX10Entry(Ba2Reader ba2Reader, int idx, BinaryReader reader)
        {
            _bsa         = ba2Reader;
            _nameHash    = reader.ReadUInt32();
            Path         = _nameHash.ToString("X");
            _extension   = Encoding.UTF8.GetString(reader.ReadBytes(4));
            _dirHash     = reader.ReadUInt32();
            _unk8        = reader.ReadByte();
            _numChunks   = reader.ReadByte();
            _chunkHdrLen = reader.ReadUInt16();
            _height      = reader.ReadUInt16();
            _width       = reader.ReadUInt16();
            _numMips     = reader.ReadByte();
            _format      = reader.ReadByte();
            _unk16       = reader.ReadUInt16();
            _index       = idx;

            _chunks = Enumerable.Range(0, _numChunks)
                      .Select(_ => new BA2TextureChunk(reader))
                      .ToList();
        }