mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'gl-fade-placeholder' into 'master'
V_DrawCustomFadeScreen fallback behaviour for Legacy GL See merge request KartKrew/Kart!2270
This commit is contained in:
commit
ff9d202de4
4 changed files with 44 additions and 3 deletions
|
|
@ -637,13 +637,17 @@ static bool D_Display(bool world)
|
|||
}
|
||||
|
||||
// rhi: display the software framebuffer to the screen
|
||||
if (rendermode == render_soft)
|
||||
//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)
|
||||
// ---
|
||||
// last minute toast edit: We need to run most of this so
|
||||
// that the fallback GL behaviour activates at the right time
|
||||
|
||||
if (gamestate != GS_TITLESCREEN
|
||||
&& G_GamestateUsesLevel() == true
|
||||
&& lt_fade < 16)
|
||||
|
|
@ -668,7 +672,10 @@ static bool D_Display(bool world)
|
|||
}
|
||||
}
|
||||
|
||||
VID_DisplaySoftwareScreen();
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
VID_DisplaySoftwareScreen();
|
||||
}
|
||||
}
|
||||
|
||||
if (lastdraw)
|
||||
|
|
|
|||
|
|
@ -748,6 +748,33 @@ void HWR_EncoreInvertScreen(void)
|
|||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Invert|PF_NoDepthTest);
|
||||
}
|
||||
|
||||
void HWR_DrawCustomFadeScreen(UINT8 color, UINT8 strength)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FSurfaceInfo Surf;
|
||||
|
||||
v[0].x = v[3].x = -1.0f;
|
||||
v[2].x = v[1].x = 1.0f;
|
||||
v[0].y = v[1].y = -1.0f;
|
||||
v[2].y = v[3].y = 1.0f;
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].s = v[3].s = 0.0f;
|
||||
v[2].s = v[1].s = 1.0f;
|
||||
v[0].t = v[1].t = 1.0f;
|
||||
v[2].t = v[3].t = 0.0f;
|
||||
|
||||
Surf.PolyColor.rgba = V_GetColor(color).rgba;
|
||||
|
||||
UINT16 workingstrength = (strength*12);
|
||||
if (workingstrength > 0xFF)
|
||||
Surf.PolyColor.s.alpha = 0xFF;
|
||||
else
|
||||
Surf.PolyColor.s.alpha = workingstrength;
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
||||
}
|
||||
|
||||
// Very similar to HWR_DrawConsoleBack, except we draw from the middle(-ish) of the screen to the bottom.
|
||||
void HWR_DrawTutorialBack(UINT32 color, INT32 boxheight)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ void HWR_drawAMline(const fline_t *fl, INT32 color);
|
|||
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength);
|
||||
void HWR_DrawConsoleBack(UINT32 color, INT32 height);
|
||||
void HWR_EncoreInvertScreen(void);
|
||||
void HWR_DrawCustomFadeScreen(UINT8 color, UINT8 strength);
|
||||
void HWR_DrawTutorialBack(UINT32 color, INT32 boxheight);
|
||||
void HWR_RenderSkyboxView(player_t *player);
|
||||
void HWR_RenderPlayerView(void);
|
||||
|
|
|
|||
|
|
@ -1602,7 +1602,13 @@ void V_DrawCustomFadeScreen(const char *lump, UINT8 strength)
|
|||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft && rendermode != render_none)
|
||||
{
|
||||
//HWR_DrawCustomFadeScreen(color, strength);
|
||||
HWR_DrawCustomFadeScreen(
|
||||
(strcmp(lump, "FADEMAP1") != 0
|
||||
? 31
|
||||
: 0
|
||||
),
|
||||
strength
|
||||
);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue