10 #ifndef ANIMA_BACKEND_H
11 #define ANIMA_BACKEND_H
16 #define ANIMA_PATH_BUFFER_SIZE 4096
17 #define ANIMA_BW_TILE_STRIDE 32
18 #define ANIMA_COMPOSITE_MARGIN 8
19 #define ANIMA_POKEGRA_PATH "/a/0/0/4"
20 #define ANIMA_MAX_PREVIEW_ASSETS 96
21 #define ANIMA_PREVIEW_ASSET_NAME_SIZE 96
101 const char *rom_path,
162 const char *rom_path,
176 const char *rom_path,
196 const char *rom_path,
210 const char *rom_path,
224 const char *rom_path,
238 const char *rom_path,
253 const char *rom_path,
255 int idle_repetitions,
269 const char *rom_path,
271 int idle_repetitions,
286 const char *rom_path,
303 const char *rom_path,
321 const char *rom_path,
339 const char *rom_path,
void AnimaExtractOptions_Init(AnimaExtractOptions *options)
Initialises default options for extraction.
Definition: anima_backend.c:1335
int AnimaBackend_LoadNmcrMapPreviewExt(const char *rom_path, int species, int map_index, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Builds direct static NMCR-selected composite layout preview frame.
Definition: anima_backend.c:3154
int AnimaBackend_LoadNmarAnimationPreviewExt(const char *rom_path, int species, int animation_index, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Builds custom NMAR-selected animation preview from direct timeline records.
Definition: anima_backend.c:3129
int AnimaBackend_BuildFrontNormalGifPath(const char *out_dir, char *buffer, size_t buffer_size)
Helper to generate output path for front normal battle idle GIF.
Definition: anima_backend.c:1352
int AnimaBackend_LoadSpritesheetPreview(const char *rom_path, int species, AnimaIdlePreview *out_preview)
High-level loader to build the spritesheet PNG preview buffer (Base front normal).
Definition: anima_backend.c:2334
int AnimaBackend_ExtractPokemon(const char *rom_path, int species, const char *out_dir, const AnimaExtractOptions *options)
Performs a full asset extraction pipeline for a specific Pokemon species.
Definition: anima_backend.c:3345
int AnimaBackend_LoadIdleBreakPreview(const char *rom_path, int species, AnimaIdlePreview *out_preview)
High-level loader to build the idle break variant preview buffer.
Definition: anima_backend.c:2423
int AnimaBackend_HasFemaleSprite(const char *rom_path, int species)
Verifies whether the specified species contains dedicated gender variant graphics.
Definition: anima_backend.c:3498
int AnimaBackend_LoadIdlePreviewExt(const char *rom_path, int species, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Extended loader for basic idle previews targeting custom shiny, perspective, or form variables.
Definition: anima_backend.c:3523
AnimaPreviewAssetType
Categorization of discoverable/renderable assets for a species.
Definition: anima_backend.h:26
@ ANIMA_PREVIEW_ASSET_NMAR_ANIMATION_GIF
Definition: anima_backend.h:32
@ ANIMA_PREVIEW_ASSET_STATIC_IDLE_PNG
Definition: anima_backend.h:29
@ ANIMA_PREVIEW_ASSET_SPRITESHEET_PNG
Definition: anima_backend.h:28
@ ANIMA_PREVIEW_ASSET_IDLE_BREAK_GIF
Definition: anima_backend.h:30
@ ANIMA_PREVIEW_ASSET_IDLE_GIF
Definition: anima_backend.h:27
@ ANIMA_PREVIEW_ASSET_COMPOSED_GIF
Definition: anima_backend.h:31
@ ANIMA_PREVIEW_ASSET_NMCR_MAP_GIF
Definition: anima_backend.h:33
int AnimaBackend_BuildFrontNormalIdleBreakGifPath(const char *out_dir, char *buffer, size_t buffer_size)
Helper to generate output path for front normal idle break battle GIF.
Definition: anima_backend.c:1372
int AnimaBackend_LoadComposedPreviewExt(const char *rom_path, int species, int idle_repetitions, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Extended composed idle-to-break preview builder supporting complete variant selections.
Definition: anima_backend.c:4064
int AnimaBackend_LoadIdleBreakPreviewExt(const char *rom_path, int species, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Extended idle break preview builder supporting shiny and perspective parameters.
Definition: anima_backend.c:3835
int AnimaBackend_LoadSpritesheetPreviewExt(const char *rom_path, int species, const AnimaPreviewOptions *opts, AnimaIdlePreview *out_preview)
Extended spritesheet preview builder with complete variant option mappings.
Definition: anima_backend.c:3745
#define ANIMA_PREVIEW_ASSET_NAME_SIZE
Definition: anima_backend.h:21
struct AnimaPreviewOptions AnimaPreviewOptions
Configuration context specifying target variant rendering parameters.
struct AnimaIdlePreview AnimaIdlePreview
Raw RGBA frame buffer container used by both CLI rendering and GUI preview components.
struct AnimaExtractOptions AnimaExtractOptions
Configuration parameters for a batch extraction pipeline run.
struct AnimaPreviewAssetInfo AnimaPreviewAssetInfo
Metadata record detailing a discovered asset available for preview and export.
int AnimaBackend_BuildFrontNormalStaticPath(const char *out_dir, char *buffer, size_t buffer_size)
Helper to generate output path for static normal front static preview PNG.
Definition: anima_backend.c:1392
int AnimaBackend_LoadIdlePreview(const char *rom_path, int species, AnimaIdlePreview *out_preview)
High-level loader to construct a basic idle preview (Base front normal).
Definition: anima_backend.c:2113
int AnimaBackend_ListPreviewAssets(const char *rom_path, int species, const AnimaPreviewOptions *opts, AnimaPreviewAssetInfo *out_assets, int max_assets, int *out_count)
Scans active Nitro headers in Pokegra member block to discover and populate all available assets.
Definition: anima_backend.c:3229
int AnimaBackend_ExportCurrentAsset(const char *rom_path, int species, int preview_mode, const AnimaPreviewOptions *opts, const char *out_path)
Renders and exports the active target preview buffer to a local file.
Definition: anima_backend.c:4256
int AnimaBackend_LoadComposedPreview(const char *rom_path, int species, int idle_repetitions, AnimaIdlePreview *out_preview)
High-level loader to build unified composed idle-to-break animation loop.
Definition: anima_backend.c:2643
void AnimaIdlePreview_Free(AnimaIdlePreview *preview)
Deallocates memory within an AnimaIdlePreview container.
Definition: anima_backend.c:2817
High-level animation assembly and LZW GIF compilation pipeline.
Raw RGBA frame buffer container used by both CLI rendering and GUI preview components.
Definition: anima_backend.h:53
int height
Definition: anima_backend.h:55
int width
Definition: anima_backend.h:54
int frame_count
Definition: anima_backend.h:56
unsigned char * rgba
Definition: anima_backend.h:58
int delay_cs
Definition: anima_backend.h:57
Metadata record detailing a discovered asset available for preview and export.
Definition: anima_backend.h:77
int frame_count
Definition: anima_backend.h:81
int map_index
Definition: anima_backend.h:80
AnimaPreviewAssetType type
Definition: anima_backend.h:78
char display_name[ANIMA_PREVIEW_ASSET_NAME_SIZE]
Definition: anima_backend.h:83
int animation_index
Definition: anima_backend.h:79
char label[32]
Definition: anima_backend.h:82
Configuration context specifying target variant rendering parameters.
Definition: anima_backend.h:64
int form_index
Definition: anima_backend.h:67
int gif_delay_cs
Definition: anima_backend.h:71
int is_shiny
Definition: anima_backend.h:66
int map_index
Definition: anima_backend.h:70
int is_back
Definition: anima_backend.h:68
int animation_index
Definition: anima_backend.h:69
int gender
Definition: anima_backend.h:65
Detailed parameters configuring animation exporting behavior.
Definition: gif_pipeline.h:49