mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-08 06:06:43 +01:00
timeline: initial API change for handling time delta
This commit is contained in:
parent
62316e50c2
commit
52883755f1
3 changed files with 4 additions and 2 deletions
|
@ -34,7 +34,8 @@ SYMBOL_EXPORT struct Timeline* TM_Init(struct Game* game, char* name) {
|
||||||
return timeline;
|
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
|
/* process first element from queue
|
||||||
if returns true, delete it
|
if returns true, delete it
|
||||||
and repeat for the next one */
|
and repeat for the next one */
|
||||||
|
|
|
@ -68,7 +68,7 @@ struct TM_Action {
|
||||||
/*! \brief Init timeline. */
|
/*! \brief Init timeline. */
|
||||||
struct Timeline* TM_Init(struct Game* game, char* name);
|
struct Timeline* TM_Init(struct Game* game, char* name);
|
||||||
/*! \brief Process current timeline actions. */
|
/*! \brief Process current timeline actions. */
|
||||||
void TM_Process(struct Timeline*);
|
void TM_Process(struct Timeline*, double delta);
|
||||||
/*! \brief Ask current timeline actions to draw. */
|
/*! \brief Ask current timeline actions to draw. */
|
||||||
void TM_Draw(struct Timeline*);
|
void TM_Draw(struct Timeline*);
|
||||||
/*! \brief Pauses the timeline. */
|
/*! \brief Pauses the timeline. */
|
||||||
|
|
|
@ -335,6 +335,7 @@ double Interpolate(double pos, TWEEN_STYLE style) {
|
||||||
case TWEEN_STYLE_BOUNCE_IN_OUT:
|
case TWEEN_STYLE_BOUNCE_IN_OUT:
|
||||||
return BounceEaseInOut(pos);
|
return BounceEaseInOut(pos);
|
||||||
}
|
}
|
||||||
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetTweenInterpolation(struct Tween* tween) {
|
double GetTweenInterpolation(struct Tween* tween) {
|
||||||
|
|
Loading…
Reference in a new issue