diff --git a/Makefile.common b/Makefile.common
index 08bd093c53..268c117c90 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -280,7 +280,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
frontend/menu/menu_action.o \
frontend/menu/menu_shader.o \
frontend/menu/menu_entries.o \
- frontend/menu/disp/tween.o
+ frontend/menu/menu_animation.o
endif
ifeq ($(HAVE_FREETYPE), 1)
diff --git a/frontend/menu/backend/menu_lakka_backend.c b/frontend/menu/backend/menu_lakka_backend.c
index 5dd4491905..7f09b33b24 100644
--- a/frontend/menu/backend/menu_lakka_backend.c
+++ b/frontend/menu/backend/menu_lakka_backend.c
@@ -35,7 +35,7 @@
#include "../../../settings_data.h"
#include "../disp/lakka.h"
-#include "../disp/tween.h"
+#include "../menu_animation.h"
#ifdef HAVE_CONFIG_H
#include "../../../config.h"
diff --git a/frontend/menu/disp/glui.c b/frontend/menu/disp/glui.c
index 6fd88a4b1d..44ea4c4864 100644
--- a/frontend/menu/disp/glui.c
+++ b/frontend/menu/disp/glui.c
@@ -1,7 +1,6 @@
/* RetroArch - A frontend for libretro.
- * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel De Matteis
- * Copyright (C) 2012-2014 - Michael Lelli
+ * Copyright (C) 2014 - Jean-André Santoni
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
diff --git a/frontend/menu/disp/lakka.c b/frontend/menu/disp/lakka.c
index 6c4c146d77..4aa23a6a1d 100644
--- a/frontend/menu/disp/lakka.c
+++ b/frontend/menu/disp/lakka.c
@@ -42,7 +42,7 @@
#include "../../../gfx/fonts/bitmap.h"
#include "lakka.h"
-#include "tween.h"
+#include "../menu_animation.h"
static const GLfloat lakka_vertex[] = {
0, 0,
diff --git a/frontend/menu/disp/xmb.c b/frontend/menu/disp/xmb.c
index 036642af25..e47847ade3 100644
--- a/frontend/menu/disp/xmb.c
+++ b/frontend/menu/disp/xmb.c
@@ -1,7 +1,6 @@
/* RetroArch - A frontend for libretro.
- * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel De Matteis
- * Copyright (C) 2012-2014 - Michael Lelli
+ * Copyright (C) 2014 - Jean-André Santoni
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -39,7 +38,7 @@
#include "../../../screenshot.h"
#include "shared.h"
-#include "tween.h"
+#include "../menu_animation.h"
#ifndef XMB_THEME
#define XMB_THEME "monochrome"
diff --git a/frontend/menu/disp/tween.c b/frontend/menu/menu_animation.c
similarity index 89%
rename from frontend/menu/disp/tween.c
rename to frontend/menu/menu_animation.c
index c7f2369fea..f82e2d45c2 100644
--- a/frontend/menu/disp/tween.c
+++ b/frontend/menu/menu_animation.c
@@ -1,4 +1,20 @@
-#include "tween.h"
+/* RetroArch - A frontend for libretro.
+ * Copyright (C) 2011-2014 - Daniel De Matteis
+ * Copyright (C) 2014 - Jean-André Santoni
+ *
+ * RetroArch is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Found-
+ * ation, either version 3 of the License, or (at your option) any later version.
+ *
+ * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with RetroArch.
+ * If not, see .
+ */
+
+#include "menu_animation.h"
#include
static tween_t* tweens = NULL;
diff --git a/frontend/menu/disp/tween.h b/frontend/menu/menu_animation.h
similarity index 89%
rename from frontend/menu/disp/tween.h
rename to frontend/menu/menu_animation.h
index ce3d8f7494..98887449d5 100644
--- a/frontend/menu/disp/tween.h
+++ b/frontend/menu/menu_animation.h
@@ -1,8 +1,7 @@
/* RetroArch - A frontend for libretro.
- * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel De Matteis
* Copyright (C) 2014 - Jean-André Santoni
- *
+ *
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
@@ -15,14 +14,14 @@
* If not, see .
*/
-#ifndef _TWEEN_H
-#define _TWEEN_H
+#ifndef _MENU_DISPLAY_H
+#define _MENU_DISPLAY_H
+#include
#include
typedef float (*easingFunc)(float, float, float, float);
-
-typedef void (*tweenCallback) (void);
+typedef void (*tweenCallback) (void);
typedef struct
{
@@ -36,45 +35,77 @@ typedef struct
tweenCallback callback;
} tween_t;
-void add_tween(float duration, float target_value,
- float* subject, easingFunc easing, tweenCallback callback);
+void add_tween(float duration, float target_value, float* subject,
+ easingFunc easing, tweenCallback callback);
void update_tweens(float dt);
-// from https://github.com/kikito/tween.lua/blob/master/tween.lua
+/* from https://github.com/kikito/tween.lua/blob/master/tween.lua */
float linear(float t, float b, float c, float d);
+
float inQuad(float t, float b, float c, float d);
+
float outQuad(float t, float b, float c, float d);
+
float inOutQuad(float t, float b, float c, float d);
+
float outInQuad(float t, float b, float c, float d);
+
float inCubic(float t, float b, float c, float d);
+
float outCubic(float t, float b, float c, float d);
+
float inOutCubic(float t, float b, float c, float d);
+
float outInCubic(float t, float b, float c, float d);
+
float inQuart(float t, float b, float c, float d);
+
float outQuart(float t, float b, float c, float d);
+
float inOutQuart(float t, float b, float c, float d);
+
float outInQuart(float t, float b, float c, float d);
+
float inQuint(float t, float b, float c, float d);
+
float outQuint(float t, float b, float c, float d);
+
float inOutQuint(float t, float b, float c, float d);
+
float outInQuint(float t, float b, float c, float d);
+
float inSine(float t, float b, float c, float d);
+
float outSine(float t, float b, float c, float d);
+
float inOutSine(float t, float b, float c, float d);
+
float outInSine(float t, float b, float c, float d);
+
float inExpo(float t, float b, float c, float d);
+
float outExpo(float t, float b, float c, float d);
+
float inOutExpo(float t, float b, float c, float d);
+
float outInExpo(float t, float b, float c, float d);
+
float inCirc(float t, float b, float c, float d);
+
float outCirc(float t, float b, float c, float d);
+
float inOutCirc(float t, float b, float c, float d);
+
float outInCirc(float t, float b, float c, float d);
+
float inBounce(float t, float b, float c, float d);
+
float outBounce(float t, float b, float c, float d);
+
float inOutBounce(float t, float b, float c, float d);
+
float outInBounce(float t, float b, float c, float d);
-#endif /* TWEEN_H */
+#endif
diff --git a/griffin/griffin.c b/griffin/griffin.c
index 983eae2bcf..8d522f8001 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -650,6 +650,7 @@ MENU
#include "../frontend/menu/menu_entries.c"
#include "../frontend/menu/menu_shader.c"
#include "../frontend/menu/menu_navigation.c"
+#include "../frontend/menu/menu_animation.c"
#include "../frontend/menu/backend/menu_common_backend.c"
#endif
@@ -667,7 +668,6 @@ MENU
#endif
#ifdef HAVE_OPENGL
-#include "../frontend/menu/disp/tween.c"
#ifdef HAVE_LAKKA
#include "../frontend/menu/backend/menu_lakka_backend.c"