Skip to content

cf_make_png_cache_animation_table

Category: png_cache
GitHub: cute_png_cache.h


Constructs an animation table given an array of animations, or returns one from the cache if it already exists.

const htbl CF_Animation** cf_make_png_cache_animation_table(const char* sprite_name, const CF_Animation* const* animations, int animations_count);
Parameters Description
sprite_name A unique name for the animation table.

Return Value

Returns a CF_Animation hashtable, see htbl.

Remarks

The table returned is a map of animation names to individual CF_Animation's. This is represents the guts of a sprite implementation. You may use this function if you wish to implement your own sprites. However, it's recommended to instead use cf_make_png_cache_sprite and CF_Sprite.

CF_Png
cf_png_cache_load
cf_make_png_cache_animation
cf_make_png_cache_sprite