timeline: initial API change for handling time delta

This commit is contained in:
Sebastian Krzyszkowiak 2018-05-30 00:30:12 +02:00
parent 62316e50c2
commit 52883755f1
3 changed files with 4 additions and 2 deletions

View file

@ -34,7 +34,8 @@ SYMBOL_EXPORT struct Timeline* TM_Init(struct Game* game, char* name) {
return timeline;
}
SYMBOL_EXPORT void TM_Process(struct Timeline* timeline) {
SYMBOL_EXPORT void TM_Process(struct Timeline* timeline, double delta) {
// TODO: handle delta
/* process first element from queue
if returns true, delete it
and repeat for the next one */

View file

@ -68,7 +68,7 @@ struct TM_Action {
/*! \brief Init timeline. */
struct Timeline* TM_Init(struct Game* game, char* name);
/*! \brief Process current timeline actions. */
void TM_Process(struct Timeline*);
void TM_Process(struct Timeline*, double delta);
/*! \brief Ask current timeline actions to draw. */
void TM_Draw(struct Timeline*);
/*! \brief Pauses the timeline. */

View file

@ -335,6 +335,7 @@ double Interpolate(double pos, TWEEN_STYLE style) {
case TWEEN_STYLE_BOUNCE_IN_OUT:
return BounceEaseInOut(pos);
}
return pos;
}
double GetTweenInterpolation(struct Tween* tween) {