Category: Nintendo DS
Description: Common animation format used in Nintendo DS games.
Author: lowlines & Garyong/Barubary/Aygox
Filename: nanr.xml
Size: 4.85 KB
Date Modified: 22 October 2024
| Type | Name | Offset | Size | Value | Description |
|---|---|---|---|---|---|
| Magic Stamp | 0x0000 | 4 | 0x524E414E | Stamp (RNAN) "Nitro ANimation Resource". | |
| u32 | Constant | 0x0004 | 4 | 0x0100FEFF | |
| u32 | File Size | 0x0008 | 4 | ||
| u16 | Header Size | 0x000C | 2 | 0x10 | |
| u16 | # Sections | 0x000E | 2 |
| Type | Name | Offset | Size | Value | Description |
|---|---|---|---|---|---|
| Magic Stamp | 0x0000 | 4 | 0x4B4E4241 | Stamp (KNBA) "Animation BaNK". | |
| u32 | Section Size | 0x0004 | 4 | ||
| u16 | # Banks | 0x0008 | 2 | ||
| u16 | # Total Frames | 0x000A | 2 | ||
| u32 | Bank Block Offset | 0x000C | 4 | 0x18 | Relative to start of Section + 0x8. |
| u32 | Header Block Offset | 0x0010 | 4 | Relative to start of Section + 0x8. | |
| u32 | Data Block Offset | 0x0014 | 4 | Relative to start of Section + 0x8. | |
| u64 | Padding | 0x0018 | 8 | 0x00 | |
| Bank Block - see below | |||||
| u8 | Padding | 1 | 0x00 | ||
| Header Block - see below | |||||
| u8 | Padding | 1 | 0x00 | ||
| Data Block - see below | |||||
| Type | Name | Offset | Size | Value | Description |
|---|---|---|---|---|---|
| u32 | # Frames | 0x0000 | 4 | ||
| u16 | Data Type | 0x0004 | 2 | 0 = 4 bytes 1 = 16 bytes 2 = 8 bytes | |
| u16 | Unknown | 0x0006 | 2 | 0x1? | |
| u32 | Unknown | 0x0008 | 4 | 0x2? | |
| u32 | First Header Offset | 0x000C | 4 | Relative to start of Header Block. |
| Type | Name | Offset | Size | Value | Description |
|---|---|---|---|---|---|
| u32 | Data Offset | 0x0000 | 4 | Relative to start of Data Block. | |
| u16 | Frame Duration | 0x0004 | 2 | ~= (1/60)s? | |
| u16 | Constant | 0x0006 | 2 | 0xBEEF |
| Type | Name | Offset | Size | Value | Description |
|---|---|---|---|---|---|
| u16 | Cell Index | 0x0000 | 2 | ||
| Type 0 - Normal | |||||
| u16 | Garbage | 0x0002 | 2 | Last frame will be 0xCCCC. | |
| Type 1 - Transform/Displacement | |||||
| v16 | Transform | 0x0002 | 10 | ||
| s16 | X Displacement | 0x000C | 2 | ||
| s16 | Y Displacement | 0x000E | 2 | ||
| Type 2 - Displacement | |||||
| u16 | Constant | 0x0002 | 2 | 0xBEEF | |
| s16 | X Displacement | 0x0004 | 2 | ||
| s16 | Y Displacement | 0x0006 | 2 | ||