Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Author: Magical
- Header {
- Magic [4]byte // "CRAG"
- HeaderSize uint32 // Size in bytes of this header, always 0x1C
- BOM uint16 // Always 0xFEFF
- _ uint16 // Always 0x400
- ChunkCount uint32 // Always 4 (wait)
- DataOffset uint32 // Offset to start of data inside the FIMG
- chunk, relative to start of the GARC
- Size uint32 // Total size in bytes of the GARC
- LastSize uint32 // same as last word in the FATB chunk
- }
- FATO {
- Magic [4]byte // "OTAF"
- Size uint32 // Size in bytes of this chunk
- OffsetCount uint16 // Number of records in this chunk
- _ uint16 // Padding, always 0xFFFF
- // Offsets into the FATB, relative to the start of the data
- Offsets [OffsetCount]uint32
- }
- FATB {
- Magic [4]byte // "BTAF"
- Size uint32 // Size in bytes of this chunk
- FileCount uint32 // The total number of File records in this chunk
- // For each FATO record (OffsetCount)
- []struct{
- Vec uint32 // Bit vector
- // For each set bit in Vec
- Files []struct{
- // Start of the file data, relative to DataOffset and aligned to a four-byte boundary
- Start uint32
- // End of the file data, relative to DataOffset and aligned to a four-byte boundary
- End uint32
- // Size of the file. This can be smaller than End-Start if the size is not a multiple of four bytes.
- Size uint32
- }
- }
- }
- FIMB {
- Magic [4]byte // "BMIF"
- HeaderSize uint32 // Always 0xC
- DataSize uint32 // Size in bytes of the following data
- Data []byte // File data. DataOffset points here.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement