Difference between revisions of "CGFX"

From 3dbrew
Jump to navigation Jump to search
(Created page with "CGFX is a container format used to store graphics resources. It can contain 3D models, textures and animation data. == CMDL Header == {| class="wikitable" |- ! Offset ! Length ...")
 
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.
 +
 +
== DICT ==
 +
 +
DICTs are generic structures used to store values (and associate them to a key ?). A DICT header is 0x1C bytes long.
 +
 +
DICT header :
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Length
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Magic "DICT"
 +
|-
 +
| 0x8
 +
| 0x4
 +
| DICT size
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Number of entries
 +
|}
 +
 +
DICT entry:
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Length
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| ?
 +
|-
 +
| 0x4
 +
| 0x4
 +
| ?
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Value (often offsets)
 +
|-
 +
| 0xC
 +
| 0x4
 +
| ?
 +
|}
  
 
== CMDL Header ==
 
== CMDL Header ==

Revision as of 20:51, 9 February 2014

CGFX is a container format used to store graphics resources. It can contain 3D models, textures and animation data.

DICT

DICTs are generic structures used to store values (and associate them to a key ?). A DICT header is 0x1C bytes long.

DICT header :

Offset Length Description
0x0 0x4 Magic "DICT"
0x8 0x4 DICT size
0xC 0x4 Number of entries

DICT entry:

Offset Length Description
0x0 0x4 ?
0x4 0x4 ?
0x8 0x4 Value (often offsets)
0xC 0x4 ?

CMDL Header

Offset Length Description
0x0 0x4 Magic "CMDL"
0x8 0x4 CMDL section size
0x28 0x4 Offset (self-relative) to first DICT
0x2C 0xC Global scale vector (3 floats : x, y, z)
0xB0 0x4 N/2, where N is the number of entries in SOBJ list
0xB4 0x4 Offset (self-relative) to SOBJ list
0xB4+[0xB4] 0x4*N*2 SOBJ list; each word is an offset (self-relative) to an SOBJ structure

CMDL is used to describe a 3D model. A CMDL section refers to outside data; it can not be considered separately from the rest of the CGFX file.