Difference between revisions of "BFLIM (File Format)"
Jump to navigation
Jump to search
m (→Format) |
m (→Format) |
||
Line 122: | Line 122: | ||
|0x0C | |0x0C | ||
|BC1_UNORM / DXT1 | |BC1_UNORM / DXT1 | ||
− | | | + | |Compressed |
|16 | |16 | ||
|^i / ^o BFLIM files | |^i / ^o BFLIM files | ||
Line 128: | Line 128: | ||
|0x0D | |0x0D | ||
|BC2_UNORM / DXT3 | |BC2_UNORM / DXT3 | ||
− | | | + | |Compressed |
| | | | ||
|^p BFLIM files | |^p BFLIM files | ||
Line 134: | Line 134: | ||
|0x0E | |0x0E | ||
|BC3_UNORM / DXT5 | |BC3_UNORM / DXT5 | ||
− | | | + | |Compressed |
|16 | |16 | ||
|^k / ^q BFLIM files | |^k / ^q BFLIM files |
Revision as of 23:02, 10 December 2016
The BFLIM file format is used to store layout images.
Parsing information
Header
The header is, for whatever reason, at the end of the file. It is always 0x14 bytes.
Offset | Size | Description |
---|---|---|
0x00 | 4 | "FLIM" File Identifier, ASCII string. |
0x04 | 2 | Byte order mark (BOM): 0xFE,0xFF for big endian and 0xFF,0xFE for little endian. |
0x06 | 2 | Header size, always 0x14. |
0x08 | 4 | Unknown, usually 0x03030000 or 0x02020000. |
0x0C | 4 | Filesize |
0x10 | 2 | Unknown, always 0x01. |
0x12 | 1 | Multiplier?, always upper 2 bytes of filesize. |
0x13 | 1 | Unknown, always 0. |
Data Information
Comes directly after header, always 0x14 bytes. Formats not the same in games like NSMBU, be sure to use filename if possible (EG: ^l).
Offset | Size | Description |
---|---|---|
0x14 | 4 | "imag", some signature, ASCII string. |
0x18 | 4 | Parse information size, always 0x10 (this and next 0xC bytes). |
0x1C | 2 | Width |
0x1E | 2 | Height |
0x20 | 2 | Alignment usually 0x800 (2048) or 0x1000 (4096) |
0x22 | 1 | Format, how the data is stored. |
0x23 | 1 | Swizzle, first nibble is swizzle times two (2 is 1, 4 is 2, etc), second seems to always 4 |
0x24 | 4 | Raw data size, always 0xC minus 0x28 (the header). |
Format
ID | Name | Type | Bits per pixel | Notes |
---|---|---|---|---|
0x00 | R8_UNORM / R8 | single-color | 8 | ^c BFLIM files |
0x01 | R8_UNORM / R8 | single-color | 8 | ^d BFLIM files |
0x03 | R8_G8_UNORM / R8A8 | 16 | ^f BFLIM files | |
0x05 | RGB565 | color | 16 | ^h BFLIM files |
0x09 | RGBA32_UNORM / RGBA8888 | color+alpha | ^l BFLIM files | |
0x0C | BC1_UNORM / DXT1 | Compressed | 16 | ^i / ^o BFLIM files |
0x0D | BC2_UNORM / DXT3 | Compressed | ^p BFLIM files | |
0x0E | BC3_UNORM / DXT5 | Compressed | 16 | ^k / ^q BFLIM files |
0x0F | I4? / BC4_UNORM / ATI1 (Low-End) | grey | ^r BFLIM files | |
0x10 | IA4? / BC4_UNORM / ATI (High-End) | color+alpha | ^s BFLIM files | |
0x11 | I8? / BC5_UNORM / ATI2 | color | ^t BFLIM files | |
0x12 | IA8? / BC1_UNORM / DXT1 | color+alpha | ^i BFLIM files | |
0x14 | RGBA32_UNORM / RGBA8888 | color+alpha | 32 | ^l BFLIM files |
0x15 | BC1_UNORM / DXT1 | Compressed | 32 | ^o BFLIM files |
0x16 | BC2_UNORM / DXT3 | Compressed | 32 | ^p BFLIM files |
0x17 | BC3_UNORM / DXT5 | Compressed | 32 | ^q BFLIM files |
^e BFLIM files |
Tools
The following tools can extract (and generate) BFLIM files: