Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEGA NN] NodeNameList chunk spec #68

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
60 changes: 60 additions & 0 deletions hedgedocs/docs/nn/common/chunk-format/nodenamelist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
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;

/* An array of NNS_NODENAME structs */
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 */
uint32_t 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
Radfordhound marked this conversation as resolved.
Show resolved Hide resolved
{
/* 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
Loading