NANR (NITRO-System Animation for Runtime) files store cell animation data for the 2D engine. It follows the NNS G2D Binary File Format. NANR files use file signature 'NANR'.

ABNK Block#

The ABNK (Animation Bank) block defines the set of cell animations in this file. The structure is as follows:

OffsetTypeMeaning
0x00 u16 Number of animation sequences
0x02 u16 Number of animation frames in this file
0x04 void* Offset to animation sequence array
0x08 void* Offset to animation frame array
0x0C void* Offset to animation frame data block
0x10 void* Offset to string bank (may be NULL)
0x14 void* Unused (set to 0)

The animation sequence pointer points to an array of animation sequences. These take the following structure:

OffsetTypeMeaning
0x00 u16 Number of frames
0x02 u16 Index of starting frame
0x04 u16 Animation element (0=Index, 1=Index+Translation, 2=Index+SRT)
0x06 u16 Animation type (0=invalid, 1=cell, 2=multicell)
0x08 int Animation playback mode (0=forward, 1=forward loop, 2=forward+backward, 3=forward+backward loop)

The animation frame array takes the following structure:

OffsetTypeMeaning
0x00 void* Pointer to animation frame data
0x04 u16 Frame duration of this sequence frame
0x06 u16 Padding for alignment

The format of the animation frame data depends on the format of the animation sequence.

Format for Index animation frame:

OffsetTypeMeaning
0x00 u16 Cell index

Format for Index+T animation frame:

OffsetTypeMeaning
0x00 u16 Cell index
0x02 u16 Padding
0x04 s16 Translate X
0x06 s16 Translate Y

Format for Index+SRT animation frame:

OffsetTypeMeaning
0x00 u16 Cell index
0x02 s16 Rotation angle
0x04 s32 Scale X
0x08 s32 Scale Y
0x0C s16 Translate X
0x0E s16 Translate Y

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 19-Dec-2024 21:51 by Garhoogin