I consolidated the animation functions into their own .c and .h file (removed from draw) and made it much easier to add new animations by simply modifying #define ANIMATION_NUM ... in src/animations.c and adding your animation init, run, and free functions to the arrays static const void* ANIM_INITS[], static const void* ANIM_RUNS[], and static const void* ANIM_FREES[]. Additionally, the animation selection is now O(1), instead of O(n).
UPDATES: Rebased into master and merged with recent updates.
I consolidated the animation functions into their own .c and .h file (removed from draw) and made it much easier to add new animations by simply modifying
#define ANIMATION_NUM ...
insrc/animations.c
and adding your animation init, run, and free functions to the arraysstatic const void* ANIM_INITS[]
,static const void* ANIM_RUNS[]
, andstatic const void* ANIM_FREES[]
. Additionally, the animation selection is now O(1), instead of O(n).UPDATES: Rebased into master and merged with recent updates.