|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
Nintendo Multi-Animation Resource (.NMAR) file parser. More...
#include "common.h"Go to the source code of this file.
Data Structures | |
| struct | NmarEntry |
| Represents an individual layout mapping metadata entry record. More... | |
| struct | NmarFrame |
| Represents a single keyframe configuration block in a multi-animation sequence. More... | |
| struct | NmarAnimation |
| Represents an individual animation timeline sequence block. More... | |
| struct | NmarFile |
| Unpacked representation of a complete .NMAR resource. More... | |
Typedefs | |
| typedef struct NmarEntry | NmarEntry |
| Represents an individual layout mapping metadata entry record. More... | |
| typedef struct NmarFrame | NmarFrame |
| Represents a single keyframe configuration block in a multi-animation sequence. More... | |
| typedef struct NmarAnimation | NmarAnimation |
| Represents an individual animation timeline sequence block. More... | |
| typedef struct NmarFile | NmarFile |
| Unpacked representation of a complete .NMAR resource. More... | |
Functions | |
| int | Nmar_Parse (const u8 *data, size_t size, NmarFile *out_nmar) |
| Parses an unpacked .NMAR animation resource block from raw bytes. More... | |
| int | Nmar_GetIdleMapIndex (const NmarFile *nmar) |
| Resolves default idle layout map index. More... | |
| int | Nmar_GetIdleBreakMapIndex (const NmarFile *nmar, int idle_map, int map_count) |
| Resolves rare idle break candidate layout map index. More... | |
| int | Nmar_GetFrameAtTick (const NmarFile *nmar, int animation_index, int tick, NmarFrame *out_frame) |
| Resolves keyframe attributes at a specific tick timing step. More... | |
| int | Nmar_GetTotalDuration (const NmarFile *nmar, int animation_index) |
| Calculates total duration of a timeline sequence in ticks. More... | |
| void | Nmar_Free (NmarFile *nmar) |
| Deallocates all resources held inside an NmarFile structure. More... | |
| void | Nmar_PrintInfo (const NmarFile *nmar) |
| Debug prints NMAR layout stats to stdout. More... | |
Nintendo Multi-Animation Resource (.NMAR) file parser.
| typedef struct NmarAnimation NmarAnimation |
Represents an individual animation timeline sequence block.
Represents a single keyframe configuration block in a multi-animation sequence.
| void Nmar_Free | ( | NmarFile * | nmar | ) |
Deallocates all resources held inside an NmarFile structure.
| nmar | Pointer to structure. |
| int Nmar_GetFrameAtTick | ( | const NmarFile * | nmar, |
| int | animation_index, | ||
| int | tick, | ||
| NmarFrame * | out_frame | ||
| ) |
Resolves keyframe attributes at a specific tick timing step.
| nmar | Pointer to parsed NMAR structure. |
| animation_index | Animation timeline index. |
| tick | Target timing step. |
| out_frame | Destination frame structure. |
| int Nmar_GetIdleBreakMapIndex | ( | const NmarFile * | nmar, |
| int | idle_map, | ||
| int | map_count | ||
| ) |
Resolves rare idle break candidate layout map index.
| nmar | Pointer to parsed NMAR structure. |
| idle_map | Base idle map index. |
| map_count | Total number of maps available. |
| int Nmar_GetIdleMapIndex | ( | const NmarFile * | nmar | ) |
Resolves default idle layout map index.
| nmar | Pointer to parsed NMAR structure. |
| int Nmar_GetTotalDuration | ( | const NmarFile * | nmar, |
| int | animation_index | ||
| ) |
Calculates total duration of a timeline sequence in ticks.
| nmar | Pointer to parsed NMAR structure. |
| animation_index | Target animation sequence. |
Parses an unpacked .NMAR animation resource block from raw bytes.
| data | Raw binary input buffer. |
| size | Input stream size in bytes. |
| out_nmar | Destination NmarFile structure. |
| void Nmar_PrintInfo | ( | const NmarFile * | nmar | ) |
Debug prints NMAR layout stats to stdout.
| nmar | Pointer to parsed NMAR file. |