From 4734e0aa854fb6bef8b4ad4cb303b816ad627889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Mon, 22 Jun 2015 16:04:36 -0300 Subject: [PATCH] (menu_animation) Simplify menu_animation_iterate() --- menu/menu_animation.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 16264b991b..bc5cb45fab 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -458,15 +458,12 @@ static int menu_animation_iterate( float dt, unsigned *active_tweens) { - if (!tween || !tween->alive) - return -1; - if (tween->running_since >= tween->duration) + if (!tween->alive) return -1; tween->running_since += dt; - if (tween->easing) - *tween->subject = tween->easing( + *tween->subject = tween->easing( tween->running_since, tween->initial_value, tween->target_value - tween->initial_value,