fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.47k stars 305 forks source link

Making Ly animations easily extendable (UPDATE) #541

Closed SladeGetz closed 6 months ago

SladeGetz commented 1 year ago

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.

AnErrupTion commented 6 months ago

I'll unfortunately have to close this PR because it's become stale. Feel free to reopen one though.