|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
Implementations of animation GIF processing pipelines. More...
#include "gif_pipeline.h"#include "file_util.h"#include "gif_writer.h"#include "sprite_composer.h"Macros | |
| #define | GIF_DIR_IDLE "animated_idle_gif" |
| #define | GIF_DIR_BREAK "idle_break_gif" |
| #define | GIF_DIR_OTHER "animation_gif" |
Functions | |
| void | GifExportOptions_Init (GifExportOptions *options) |
| Initializes default values for a GifExportOptions structure. More... | |
| static const char * | GifDirectoryForAnimation (const char *animation_name) |
| Resolves default directory path naming categorization based on animation type. More... | |
| static int | ResolveGifPlaybackDelayCs (const GifExportOptions *options) |
| Resolves fallback delay duration constraints. More... | |
| static int | ResolveGifMapIndex (const GifExportOptions *options, int default_idle_map, int map_count) |
| Selects active layout map index. More... | |
| static int | ResolveNmarTimelineIndex (const GifExportOptions *options, const NmarFile *nmar, const char *animation_name) |
| Resolves timeline index associated with specified track label. More... | |
| static int | NmarFrameCountForGif (const NmarFile *nmar, int animation_index, int delay_cs) |
| Computes amount of frames to generate for an NMAR sequence. More... | |
| static void | ComposerTransform_FromNmarFrame (const NmarFrame *frame, ComposerTransform *out_transform) |
| Converts timeline track frame parameters to standard spatial coordinate transforms. More... | |
| static void | ComputeNmarBoundsRange (const NcerFile *ncer, const NanrFile *nanr, const NmcrFile *nmcr, const NmarFile *nmar, int animation_index, int start_frame, int frame_count, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords, int delay_cs) |
| Calculates bounding coordinates across a timeline range of NMAR animation tracks. More... | |
| int | GifPipeline_ExportIdle (const char *out_dir, const char *side_name, const char *animation_name, const char *palette_name, const NcerFile *ncer, const NanrFile *nanr, const NmcrFile *nmcr, const NmarFile *nmar, const NcgrImage *ncgr, const NclrPalette *palette, int default_idle_map, const GifExportOptions *options, int tile_stride, int margin, const int *union_min_x, const int *union_min_y, const int *union_max_x, const int *union_max_y, const CoordFile *coords) |
| Assembles and exports a composed animated GIF based on provided resources. More... | |
Implementations of animation GIF processing pipelines.
| #define GIF_DIR_BREAK "idle_break_gif" |
| #define GIF_DIR_IDLE "animated_idle_gif" |
| #define GIF_DIR_OTHER "animation_gif" |
|
static |
Converts timeline track frame parameters to standard spatial coordinate transforms.
| frame | Source timeline keyframe attributes. |
| out_transform | Target destination container. |
|
static |
Calculates bounding coordinates across a timeline range of NMAR animation tracks.
| ncer | Cells metadata. |
| nanr | Keyframes mapping. |
| nmcr | Multi-cell layouts. |
| nmar | Multi-animation track details. |
| animation_index | Target sequence track. |
| start_frame | Beginning index. |
| frame_count | Amount of frames to scan. |
| out_min_x | Output minimum X bound. |
| out_min_y | Output minimum Y bound. |
| out_max_x | Output maximum X bound. |
| out_max_y | Output maximum Y bound. |
| coords | Coordinates anchors. |
| delay_cs | Frame duration delay. |
|
static |
Resolves default directory path naming categorization based on animation type.
| animation_name | Category identifier ("idle", "break"). |
| void GifExportOptions_Init | ( | GifExportOptions * | options | ) |
Initializes default values for a GifExportOptions structure.
| options | Pointer to options struct to modify. |
| int GifPipeline_ExportIdle | ( | const char * | out_dir, |
| const char * | side_name, | ||
| const char * | animation_name, | ||
| const char * | palette_name, | ||
| const NcerFile * | ncer, | ||
| const NanrFile * | nanr, | ||
| const NmcrFile * | nmcr, | ||
| const NmarFile * | nmar, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | default_idle_map, | ||
| const GifExportOptions * | options, | ||
| int | tile_stride, | ||
| int | margin, | ||
| const int * | union_min_x, | ||
| const int * | union_min_y, | ||
| const int * | union_max_x, | ||
| const int * | union_max_y, | ||
| const CoordFile * | coords | ||
| ) |
Assembles and exports a composed animated GIF based on provided resources.
| out_dir | Directory path to write output file. |
| side_name | Label used in output filename (e.g., "front", "back"). |
| animation_name | Label representing animation sequence (e.g., "idle", "break"). |
| palette_name | Label for color variant (e.g., "normal", "shiny"). |
| ncer | Pointer to the parsed cell resource file (.NCER). |
| nanr | Pointer to the parsed animation resource file (.NANR). |
| nmcr | Pointer to the parsed multi-cell mapping layout (.NMCR). |
| nmar | Pointer to the parsed multi-animation sequence (.NMAR). |
| ncgr | Pointer to the parsed character graphics tiles (.NCGR). |
| palette | Pointer to the parsed color palette resource (.NCLR). |
| default_idle_map | Default layout index for species' base idle frame. |
| options | Export configurations. |
| tile_stride | Width stride (in tiles) of NCGR image data. |
| margin | Safety boundary width in pixels around the composed animation. |
| union_min_x | Precalculated bounding box minimum horizontal coordinate. |
| union_min_y | Precalculated bounding box minimum vertical coordinate. |
| union_max_x | Precalculated bounding box maximum horizontal coordinate. |
| union_max_y | Precalculated bounding box maximum vertical coordinate. |
| coords | Optional CoordFile pointers to adjust horizontal/vertical offsets. |
|
static |
Computes amount of frames to generate for an NMAR sequence.
| nmar | Timeline details. |
| animation_index | Animation sequence index. |
| delay_cs | Frame duration. |
|
static |
Selects active layout map index.
| options | Export configurations. |
| default_idle_map | Base idle index. |
| map_count | Total maps available. |
|
static |
Resolves fallback delay duration constraints.
| options | Target export configurations. |
|
static |
Resolves timeline index associated with specified track label.
| options | Export configurations. |
| nmar | Track list details. |
| animation_name | Track label string. |