CINF (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
>Aruki
mNo edit summary
>Aruki
No edit summary
Line 1: Line 1:
The '''CINF format''' is for skeletons. It can only be parsed on Halloween.
The '''CINF format''' is for skeletons. Skeletons are associated with models and skins through [[ANCS (File Format)|ANCS]] files.


{{todo|Write article.}}
{{researchminor|reason=What is the point of the bone ID section?}}
{{todo|MP2/3/DKCR differences}}
 
== Format ==
 
The file starts with a list of all the bones in the skeleton. The first value is a 32-bit count, then the following structure loops.
 
{| class="wikitable"
! Offset
! Type
! Size
! Description
|-
| 0x0
| u32
| 4
| '''Bone ID'''
|-
| 0x4
| u32
| 4
| '''Parent Bone ID'''
|-
| 0x8
| float[3]
| 0xC
| '''Position'''
|-
| 0x14
| u32
| 4
| '''Linked bone count''' (LC); includes parent + children
|-
| 0x18
| u32[]
| 4 × LC
| '''Linked bone ID array'''
|}
 
After this is an array listing every bone ID in the skeleton. The first bone is the root bone, then the rest are listed in reverse numerical order.
 
{| class="wikitable"
! Type
! Count
! Description
|-
| u32
| 1
| '''Bone ID count''' (BC)
|-
| u32
| BC
| '''Bone ID array'''
|}
 
Finally, the end of the file sets bone names. After the traditional count value, this short structure loops:
 
{| class="wikitable"
! Type
! Count
! Description
|-
| string
| 1
| '''Bone name'''
|-
| u32
| 1
| '''Bone ID'''
|}


[[Category:File Formats]]
[[Category:File Formats]]

Revision as of 18:30, 28 January 2015

The CINF format is for skeletons. Skeletons are associated with models and skins through ANCS files.

This file format is almost completely documented
What is the point of the bone ID section?
To do:
MP2/3/DKCR differences

Format

The file starts with a list of all the bones in the skeleton. The first value is a 32-bit count, then the following structure loops.

Offset Type Size Description
0x0 u32 4 Bone ID
0x4 u32 4 Parent Bone ID
0x8 float[3] 0xC Position
0x14 u32 4 Linked bone count (LC); includes parent + children
0x18 u32[] 4 × LC Linked bone ID array

After this is an array listing every bone ID in the skeleton. The first bone is the root bone, then the rest are listed in reverse numerical order.

Type Count Description
u32 1 Bone ID count (BC)
u32 BC Bone ID array

Finally, the end of the file sets bone names. After the traditional count value, this short structure loops:

Type Count Description
string 1 Bone name
u32 1 Bone ID