CGFX: Difference between revisions
m →TXOB |
Planetarian (talk | contribs) added info on the CGFX/DATA headers ~~~~ |
||
Line 1: | Line 1: | ||
CGFX is a container format used to store graphics resources. It can contain 3D models, textures and animation data. | CGFX is a container format used to store graphics resources. It can contain 3D models, textures and animation data. | ||
== CGFX == | |||
CGFX header : | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Length | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| Magic "CGFX" | |||
|- | |||
| 0x4 | |||
| 0xC | |||
| ? | |||
|- | |||
| 0x10 | |||
| 0x4 | |||
| Number of entries | |||
|} | |||
A typical CGFX file contains two main entries, beginning directly after the CGFX header: DATA and IMAG. | |||
== DATA == | |||
DATA contains a list of DICT references. | |||
The DATA header contains the entry counts and offsets for each DICT entry, and holds sixteen such references. Unused references are zero-padded. | |||
DATA header (for N = 0..15) : | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Length | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| Magic "DATA" | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| DATA Size (in bytes) | |||
|- | |||
| 0x8 +(N*8) | |||
| 0x4 | |||
| Number of DICT entries | |||
|- | |||
| 0xC +(N*8) | |||
| 0x4 | |||
| Offset (self-relative) to DICT | |||
|} | |||
== DICT == | == DICT == |