Menus: interpolate Gamemode menu transitions

This commit is contained in:
James R 2023-12-27 11:32:59 -08:00
parent fd26fc6287
commit ec2ecd2e62

View file

@ -1212,6 +1212,7 @@ void M_DrawKartGamemodeMenu(void)
{ {
UINT8 n = 0; UINT8 n = 0;
INT32 i, x, y; INT32 i, x, y;
INT32 tx = M_EaseWithTransition(Easing_Linear, 5 * 48);
for (i = 0; i < currentMenu->numitems; i++) for (i = 0; i < currentMenu->numitems; i++)
{ {
@ -1224,16 +1225,11 @@ void M_DrawKartGamemodeMenu(void)
} }
n--; n--;
x = GM_STARTX - ((GM_XOFFSET / 2) * (n-1)); x = GM_STARTX - ((GM_XOFFSET / 2) * (n-1)) + tx;
y = GM_STARTY - ((GM_YOFFSET / 2) * (n-1)); y = GM_STARTY - ((GM_YOFFSET / 2) * (n-1));
M_DrawMenuTooltips(); M_DrawMenuTooltips();
if (menutransition.tics)
{
x += 48 * menutransition.tics;
}
for (i = 0; i < currentMenu->numitems; i++) for (i = 0; i < currentMenu->numitems; i++)
{ {
INT32 type; INT32 type;
@ -1245,13 +1241,9 @@ void M_DrawKartGamemodeMenu(void)
if (i >= currentMenu->numitems-1) if (i >= currentMenu->numitems-1)
{ {
x = GM_STARTX + (GM_XOFFSET * 5 / 2); x = GM_STARTX + (GM_XOFFSET * 5 / 2) + tx;
y = GM_STARTY + (GM_YOFFSET * 5 / 2); y = GM_STARTY + (GM_YOFFSET * 5 / 2);
if (menutransition.tics)
{
x += 48 * menutransition.tics;
}
} }
INT32 cx = x; INT32 cx = x;