mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +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;
|
||||
}
|
||||
|
||||
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 */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue