Editing BTI file

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
'''BTI''' is an image file format similar to [[TEX0]], [[TPL]] and [[BREFT]] file formats. The only difference is the file header.
+
A form of 2d data the can be opened in gcft
 
+
{{Credits|Gamecubing8619}}
__TOC__
 
 
 
== File Format ==
 
The file format is very simple and starts with a file header followed by the image data. All data is written in [[big endian]].
 
 
 
=== File Header ===
 
The following table shows the file header. It is 0x20 bytes long. There is no magic to identify BTI files,
 
so tools may do some plausibility checks to identify them.
 
 
 
{| class="wikitable"
 
|+ File Header
 
|-
 
! Offset !! Type !! Description
 
|-
 
| 0x00 || Byte || '''[[Image Formats|Image format]]'''.
 
|-
 
| 0x01 || Byte || '''Enable alpha''' (0x00 means alpha is disabled, anything higher means alpha is enabled).
 
|-
 
| 0x02 || UInt16 || '''Width''' of the image in pixels.
 
|-
 
| 0x04 || UInt16 || '''Height''' of the image in pixels.
 
|-
 
| 0x06 || Byte || '''Wrap S'''[http://www.amnoid.de/gc/bti.txt] (0x01 for posteffect.bti, 0x00 for others). Probably repeat, clamp or mirror wraps for U projection maps.
 
|-
 
| 0x07 || Byte || '''Wrap T'''[http://www.amnoid.de/gc/bti.txt] (0x01 for posteffect.bti, 0x00 for others). Probably repeat, clamp or mirror wraps for V projection maps.
 
|-
 
| 0x08 || UInt16 || '''[[Image Formats#Palette_Formats|Palette format]]''' (not used in [[Mario Kart Wii]]).
 
|-
 
| 0x0A || UInt16 || '''Number of palette entries'''.
 
|-
 
| 0x0C || UInt32 || '''Offset to [[#Image and Palette Data|palette data]]''', relative to the start of the file header.
 
|-
 
| 0x10 || UInt32 || {{Unknown-left|'''Unknown'''.}} Always 0 in [[Mario Kart Wii]].
 
|-
 
| 0x14 || Byte || '''Magnification filter type''' (0x00 means nearest, 0x01 means linear).
 
|-
 
| 0x15 || Byte || '''Minification filter type'''.
 
|-
 
| 0x16 || UInt16 || {{Unknown-left|'''Unknown'''.}} Always 0 in [[Mario Kart Wii]].
 
|-
 
| 0x18 || Byte || '''Total number of images''', thus number of mipmaps + 1.
 
|-
 
| 0x19 || Byte || {{Unknown-left|'''Unknown'''.}} Always 0 in [[Mario Kart Wii]].
 
|-
 
| 0x1A || UInt16 || {{Unknown-left|'''Unknown'''.}} Always 0 in [[Mario Kart Wii]].
 
|-
 
| 0x1C || UInt32 || '''Offset to [[#Image and Palette Data|image data]]''', relative to the start of the file header.
 
|-
 
| 0x20 || colspan=2 {{unknown|End of file header}}
 
|}
 
 
 
=== Image and Palette Data ===
 
The image and palette data starts at the given data offset in the file header.
 
The data depends on the image and palette formats format.
 
The image format values are listed below.
 
 
 
{{Credits|Gamecubing8619,Vulcan,wiki.tockdom.com}}
 

Please note that all contributions to Pikmin Technical Knowledge Base are considered to be released under the Creative Commons Attribution-ShareAlike (see Pikmin Technical Knowledge Base:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)