Skip to content

Commit

Permalink
[SEGA NN] NodeNameList chunk spec
Browse files Browse the repository at this point in the history
  • Loading branch information
TheExentist151 committed Mar 14, 2024
1 parent 23a83a7 commit 5a50f95
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hedgedocs/docs/nn/common/chunk-format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ All known data chunk types are listed in the following chart:
| -- | -- | ----------------------------------- | ----------------------------------------------------------------- |
| TL | t | [TEXLIST](texlist.md) | A list of textures. |
| EF | ? | EFFECTLIST | A list of effects (shaders). |
| NN | a | NODENAMELIST | A list of names for the nodes (bones) within an object (a model). |
| NN | a | [NODENAMELIST](nodenamelist.md) | A list of names for the nodes (bones) within an object (a model). |
| OB | o | OBJECT | A model. |
| CA | ? | CAMERA | Camera parameters. |
| MO | m | MOTION (node) | A node (bone) animation. |
Expand Down
59 changes: 59 additions & 0 deletions hedgedocs/docs/nn/common/chunk-format/nodenamelist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
description: Sega NN NODENAMELIST Data Chunk Format Specification
---

# NODENAMELIST

## NNS_NODENAMELIST

!!! important
This is the "main" (root) struct for all NN node (bone) name list chunks.

```c
struct NNS_NODENAMELIST
{
/* The sorting type */
NNE_NODENAME_SORTTYPE SortType;

/* The size of [pNodeNameList] array */
uint32_t nNode;

NNS_NODENAME* pNodeNameList;
};
```

!!! todo
Find the macros used in the text-form file format

## NNS_NODENAME

The actual node (bone) name

```c
struct NNS_NODENAME
{
/* The node index */
int iNode;

/* The node name */
char* Name;
};
```

## NNE_NODENAME_SORTTYPE

This enum indicates the sorting type used in the node name list.

```c
enum NNE_NODENAME_SORTTYPE
{
/* Sorting by index */
NNE_NODENAME_SORTTYPE_INDEX,

/* Sorting by name */
NNE_NODENAME_SORTTYPE_NAME
};
```

!!! todo
Find the macros used in the text-form file format
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ nav:
- Common:
- NN Chunk Format:
- docs/nn/common/chunk-format/index.md
- NODENAMELIST: docs/nn/common/chunk-format/nodenamelist.md
- TEXLIST: docs/nn/common/chunk-format/texlist.md
- Discoveries:
- discoveries/index.md
Expand Down

0 comments on commit 5a50f95

Please sign in to comment.