Merge branch 'swag-fade-returns' into 'master'

Move V_DrawCustomFadeScreen to D_Display

See merge request KartKrew/Kart!1480
This commit is contained in:
Oni 2023-09-12 04:46:47 +00:00
commit 9e283a4993
3 changed files with 22 additions and 5 deletions

View file

@ -580,6 +580,19 @@ static void D_Display(void)
// rhi: display the software framebuffer to the screen
if (rendermode == render_soft)
{
// TODO: THIS SHOULD IDEALLY BE IN REGULAR HUD CODE !!
// (st_stuff.c ST_Drawer, also duplicated in k_podium.c)
// Unfortunately this is the latest place we can do it
// If we could immediately tint the GPU data a lot
// of problems could be solved (including GL support)
if (gamestate != GS_TITLESCREEN
&& G_GamestateUsesLevel() == true
&& timeinmap < 16)
{
// Level fade-in
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2));
}
VID_DisplaySoftwareScreen();
}

View file

@ -601,11 +601,12 @@ void K_CeremonyDrawer(void)
}
}
if (timeinmap < 16)
// See d_main.c and V_DrawCustomFadeScreen for the hacks that prevents this being here
/*if (timeinmap < 16)
{
// Level fade-in
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2));
}
}*/
if (podiumData.state == PODIUM_STATES)
{

View file

@ -1528,9 +1528,12 @@ void ST_Drawer(void)
ST_MayonakaStatic();
}
// Draw a fade on level opening
if (timeinmap < 16)
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2)); // Then gradually fade out from there
// See d_main.c and V_DrawCustomFadeScreen for the hacks that prevents this being here
/*if (timeinmap < 16)
{
// Level fade-in
V_DrawCustomFadeScreen(((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), 31-(timeinmap*2));
}*/
if (stagetitle)
ST_drawTitleCard();