Changes

Jump to navigation Jump to search

FF7/TEX format

186 bytes added, 18:59, 29 June 2009
TEX Texture Data Format for PC by Mirex (Edits by Aali)
<tr>
<td style="border: 1px solid redblack;">
0x00 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Version, must be 1, or FF7 won't load the file </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x04 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x08 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Color key flag </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x0C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x10 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x14 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Minimum bits per color (D3D driver uses these to determine which texture format to convert to on load) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x18 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Maximum bits per color </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x1C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Minimum alpha bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x20 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Maximum alpha bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x24 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Minimum bits per pixel </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x28 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Maximum bits per pixel </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x2C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x30 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of palettes </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x34 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of colors per palette </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x38 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Bit depth </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x44 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Pitch or bytes per row, usually ignored and assumed to be bytes per pixel * width </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x48 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x4C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Palette flag (this indicates the presence of a palette) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x50 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Bits per index, always 0 for non-paletted images </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x54 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Indexed-to-8bit flag, never used in FF7 </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x58 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Palette size, always palettes * colors per palette </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x5C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of colors per palette (again, may be 0 sometimes, the other value will be used anyway) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x60 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Runtime data, ignored on load </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x64 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Bits per pixel </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x68 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Bytes per pixel, always use this to determine how much data to read, if this is 1 you read 1 byte per pixel, regardless of bit depth </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x6C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of red bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x70 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of green bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x74 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of blue bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x78 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Number of alpha bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x7C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Red bitmask </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x80 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Green bitmask </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x84 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Blue bitmask </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x88 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Alpha bitmask </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x8C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Red shift </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x90 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Green shift </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x94 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Blue shift </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x98 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Alpha shift </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0x9C </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Always 8 - Number of red bits (Not sure what the point of these fields is, they're always ignored anyway) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xA0 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
8 - Number of green bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xA4 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
8 - Number of blue bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xA8 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
8 - Number of alpha bits </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xAC </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Red max </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xB0 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Green max </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xB4 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Blue max </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xB8 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Alpha max </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xBC </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Color key array flag (this indicates the presence of a color key array) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xC0 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Runtime data </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xC4 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Reference alpha (more on this later) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xC8 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xCC </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xD0 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Palette index (runtime data) </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xD4 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Runtime data </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xD8 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Runtime data </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xDC </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xE0 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid redblack;">
0xE4 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border: 1px solid red;">0xE4 </td><td style="border: 1px solid red;">4 bytes (long) </td><td style="border: 1px solid red;">Unknown </td></tr> <tr><td style="border: 1px solid redblack;">
0xE8 </td>
<td style="border: 1px solid redblack;">
4 bytes (long) </td>
<td style="border: 1px solid redblack;">
Unknown </td>
</tr>
<tr>
<td style="border-style: solid none solid solid; border-color: redblack; border-width: 1px; vertical-align: top;"></td><td colspan="2" style="border-style: solid solid solid none; border-color: redblack; border-width: 1px;">
Palette data (ignore this section if palette flag is 0) </td>
</tr>
<tr>
<td style="border: 1px solid redblack; vertical-align: top;">
0xEC </td>
<td style="border: 1px solid redblack; vertical-align: top;">
Palette size * 4 </td>
<td style="border: 1px solid redblack; vertical-align: top;">
The raw palette data, always in 32-bit BGRA format</td>
</tr>
Anonymous user

Navigation menu