(menu_animation) Simplify menu_animation_iterate()

This commit is contained in:
Higor Eurípedes 2015-06-22 16:04:36 -03:00
parent e6a2c3102d
commit 4734e0aa85

View File

@ -458,15 +458,12 @@ static int menu_animation_iterate(
float dt, float dt,
unsigned *active_tweens) unsigned *active_tweens)
{ {
if (!tween || !tween->alive) if (!tween->alive)
return -1;
if (tween->running_since >= tween->duration)
return -1; return -1;
tween->running_since += dt; tween->running_since += dt;
if (tween->easing) *tween->subject = tween->easing(
*tween->subject = tween->easing(
tween->running_since, tween->running_since,
tween->initial_value, tween->initial_value,
tween->target_value - tween->initial_value, tween->target_value - tween->initial_value,