Cleaned the timeline code up nicely.

This commit is contained in:
2021-07-15 09:26:31 -07:00
parent 1c1eef3363
commit 96e66901ff
4 changed files with 35 additions and 31 deletions

View File

@ -72,6 +72,7 @@ bool timelineIsFinished(timeline_t *timeline) {
timelineaction_t * timelineAddAction(timeline_t *timeline, float start,
float duration
) {
if(timeline->actionCount == TIMELINE_ACTION_COUNT_MAX) return NULL;
timelineaction_t *action = timeline->actions + (timeline->actionCount++);
action->start = start, action->duration = duration;
action->onStart = action->onEnd = action->onDuration = NULL;