No edit summary |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
''This article is about the TPL file format.'' | ''This article is about the TPL file format.'' | ||
{{Research | 1| The structure of this file is well known. }} | |||
'''TPL''' file format ('''T'''exture '''P'''alette '''L'''ibrary) is a folder with [https://www.gc-forever.com/yagcd/chap15.html#sec15.3 one or several | '''TPL''' file format ('''T'''exture '''P'''alette '''L'''ibrary) is a folder with [https://www.gc-forever.com/yagcd/chap15.html#sec15.3 one or several texture]. | ||
== Format == | == Format == | ||
A TPL file | A TPL file contains one or several texture: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 21: | Line 18: | ||
| colspan=2 align=center | Image offset table | | colspan=2 align=center | Image offset table | ||
|- | |- | ||
| rowspan=4 align=center | All images || align=center | Palette header ( | | rowspan=4 align=center | All images || align=center | Palette header (optional) | ||
|- | |- | ||
| align=center | Palette data ( | | align=center | Palette data (optional) | ||
|- | |- | ||
| align=center | Image header | | align=center | Image header | ||
Line 34: | Line 31: | ||
In general the header has a length of 12 bytes. All offsets are relative to the header. | In general the header has a length of 12 bytes. All offsets are relative to the header. | ||
Header : | Header: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 41: | Line 38: | ||
! Offset !! Length !! Description | ! Offset !! Length !! Description | ||
|- | |- | ||
| 0x00 || 4 || FileMagic. | | 0x00 || 4 || FileMagic. Always "\x00\x20\xAF\x30" (big endian) | ||
|- | |- | ||
| 0x04 || 4 || Image count. | | 0x04 || 4 || Image count. |
Latest revision as of 13:52, 7 October 2023
This article is about the TPL file format.
This file format is almost completely documented. The structure of this file is well known. |
TPL file format (Texture Palette Library) is a folder with one or several texture.
Format
A TPL file contains one or several texture:
General format | |
---|---|
TPL header file | |
Image offset table | |
All images | Palette header (optional) |
Palette data (optional) | |
Image header | |
Image data |
Header
In general the header has a length of 12 bytes. All offsets are relative to the header.
Header:
Header | ||
---|---|---|
Offset | Length | Description |
0x00 | 4 | FileMagic. Always "\x00\x20\xAF\x30" (big endian) |
0x04 | 4 | Image count. |
0x08 | 4 | Image table offset |
Gotcha Force TPLs length
All TPLs are aligned to 32 bytes. (NTSC/USA version)
Softwares
Softwares below handle TPLs files:
- Rainbow, credits Marco Calautti.
- BrawlBox, contributors: libertyernie, Sammi Husky, and BlackJax96
- CTools Pack, credits Chadderz
- Wiimms SZS Tools, credits Wiimm: can contain BREFT, BTI, TEX0, TPL and PNG.
- Wexos's Toolbox, credits Wexos