Difference between revisions of "BREFT (File Format)"
Jump to navigation
Jump to search
(Moved info) |
(→File Format: #OilAlert) |
||
(13 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
== File Format == | == File Format == | ||
− | A BREFT sub file starts with a header of 32 bytes followed by the | + | A BREFT sub file starts with a header of 32 bytes followed by the image data. The sub file item explained [[BREFF and BREFT (File Format)#Sub File Item|here]] points to this header. The size of the sub file item only counts the size of the image data. |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Offset | + | ! Offset !! Type !! Description |
|- | |- | ||
− | | 0x00 | + | | 0x00 || UInt32 || {{Unknown-left|Unused. Offset to absolute path of intermediate file.}} |
|- | |- | ||
− | | 0x04 | + | | 0x04 || UInt16 || '''Width''' of the image in pixels (values in the range 0x8-0x100). |
|- | |- | ||
− | | 0x06 | + | | 0x06 ||UInt16 || '''Height''' of the image in pixels (values in the range 0x10-0x100). |
|- | |- | ||
− | | 0x08 | + | | 0x08 || UInt32 || Size of image data. |
|- | |- | ||
− | | 0x0C || | + | | 0x0C || Byte || '''[[Image Formats#Image Formats|Image format]]''' of the image. |
− | |||
|- | |- | ||
− | | 0x0D || | + | | 0x0D || Byte || '''[[Image Formats#Palette Formats|Palette format]]''' of the image. |
|- | |- | ||
− | | | + | | 0x0E || UInt16 || Number of '''[[Image Formats#Palette Formats|palette entries]]'''. |
|- | |- | ||
− | | | + | | 0x10 || UInt32 || Size of the '''[[Image Formats#Palette Formats|palette data]]'''. |
|- | |- | ||
− | | | + | | 0x14 || Byte || Total number of mipmaps. |
|- | |- | ||
− | | | + | | 0x15 || Byte[3] || {{Unknown-left|Reserved.}} |
|- | |- | ||
− | | | + | | 0x18 || UInt32 || Texture data offset. |
|- | |- | ||
− | | | + | | 0x1C || UInt32 || Palette data offset. |
|- | |- | ||
− | + | | colspan=3 {{Unknown|End of sub file}} | |
|} | |} | ||
Line 42: | Line 41: | ||
= Tools = | = Tools = | ||
The following tools can handle BREFT files: | The following tools can handle BREFT files: | ||
− | * [[BrawlBox]], by | + | * [[BrawlBox]], by Kryal and BlackJax96 |
* [[SZS Modifier]], by [[MrBean35000vr]] and [[Chadderz]] | * [[SZS Modifier]], by [[MrBean35000vr]] and [[Chadderz]] | ||
* [[Wiimms SZS Tools]], by [[Wiimm]] | * [[Wiimms SZS Tools]], by [[Wiimm]] | ||
+ | * [[Wexos's Toolbox]], by [[Wexos]] | ||
− | [[ | + | [[Category:File Format/Wii]] |
Latest revision as of 12:35, 5 May 2023
Introduction
Read BREFF and BREFT (File Format) for an introduction.
File Format
A BREFT sub file starts with a header of 32 bytes followed by the image data. The sub file item explained here points to this header. The size of the sub file item only counts the size of the image data.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Unused. Offset to absolute path of intermediate file. |
0x04 | UInt16 | Width of the image in pixels (values in the range 0x8-0x100). |
0x06 | UInt16 | Height of the image in pixels (values in the range 0x10-0x100). |
0x08 | UInt32 | Size of image data. |
0x0C | Byte | Image format of the image. |
0x0D | Byte | Palette format of the image. |
0x0E | UInt16 | Number of palette entries. |
0x10 | UInt32 | Size of the palette data. |
0x14 | Byte | Total number of mipmaps. |
0x15 | Byte[3] | Reserved. |
0x18 | UInt32 | Texture data offset. |
0x1C | UInt32 | Palette data offset. |
End of sub file |
Image Formats
ID | Name | Bits per pixel | Block width | Block height | Block size | Type |
---|---|---|---|---|---|---|
0x00 | I4 | 4 | 8 | 8 | 32 bytes | Gray |
0x01 | I8 | 8 | 8 | 4 | 32 bytes | Gray |
0x02 | IA4 | 8 | 8 | 4 | 32 bytes | Gray + Alpha |
0x03 | IA8 | 16 | 4 | 4 | 32 bytes | Gray + Alpha |
0x04 | RGB565 | 16 | 4 | 4 | 32 bytes | Color |
0x05 | RGB5A3 | 16 | 4 | 4 | 32 bytes | Color + Alpha |
0x06 | RGBA32 (RGBA8) | 32 | 4 | 4 | 64 bytes | Color + Alpha |
0x08 | C4 (CI4) | 4 | 8 | 8 | 32 bytes | Palette (IA8, RGB565, RGB5A3) |
0x09 | C8 (CI8) | 8 | 8 | 4 | 32 bytes | Palette (IA8, RGB565, RGB5A3) |
0x0A | C14X2 (CI14x2) | 16 | 4 | 4 | 32 bytes | Palette (IA8, RGB565, RGB5A3) |
0x0E | CMPR | 4 | 8 | 8 | 32 bytes | Color + optional Alpha (compressed) |
Tools
The following tools can handle BREFT files:
- BrawlBox, by Kryal and BlackJax96
- SZS Modifier, by MrBean35000vr and Chadderz
- Wiimms SZS Tools, by Wiimm
- Wexos's Toolbox, by Wexos