add toggle for beta intermission screen + smol cleanup

This commit is contained in:
Alug committed 2024-06-03 15:13:46 +02:00
1 parent f977af6a80
commit 1ab7a2acf4
4 files changed
+25 -17

No files matched your search

+4
View File
@@ -577,6 +577,8 @@ static CV_PossibleValue_t skinselectgridsort_t[] ={
};
consvar_t cv_skinselectgridsort ={ "skinselectgridsort", "Real name", CV_SAVE|CV_CALL|CV_NOINIT, skinselectgridsort_t, sortSkinGrid, 0, NULL, NULL, 0, 0, NULL };
consvar_t cv_betainterscreen = {"betaintermissionscreen", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
INT16 gametype = GT_RACE; // SRB2kart
boolean forceresetplayers = false;
boolean deferencoremode = false;
@@ -822,6 +824,8 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_netdemosyncquality);
CV_RegisterVar(&cv_maxdemosize);
CV_RegisterVar(&cv_keyboardlayout);
CV_RegisterVar(&cv_betainterscreen);
}
// =========================================================================
+2
View File
@@ -205,6 +205,8 @@ extern consvar_t cv_showtrackaddon;
extern consvar_t cv_showspecstuff;
extern consvar_t cv_betainterscreen;
typedef enum
{
SKINMENUTYPE_SCROLL = 0,
+1 -6
View File
@@ -6234,12 +6234,7 @@ void HWR_EndScreenWipe(void)
void HWR_DrawIntermissionBG(void)
{
patch_t *bgpatch = W_CachePatchName("SRB2BACK", PU_CACHE);
if (cv_grscreentextures.value == 2)
HWD.pfnDrawScreenTexture(HWD_SCREENTEXTURE_GENERIC1, NULL, 0);
else
V_DrawPatchFill(bgpatch); // use the neato kart bg for intermission on disabled screen textures
HWD.pfnDrawScreenTexture(HWD_SCREENTEXTURE_GENERIC1, NULL, 0);
}
void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum)
+18 -11
View File
@@ -100,10 +100,10 @@ static y_data data;
static patch_t *bgpatch = NULL; // INTERSCR
static patch_t *widebgpatch = NULL; // INTERSCW
static patch_t *bgtile = NULL; // SPECTILE/SRB2BACK
static patch_t *interpic = NULL; // custom picture defined in map header
static boolean usetile;
//static patch_t *interpic = NULL; // custom picture defined in map header
//static boolean usetile;
boolean usebuffer = false;
static boolean useinterpic;
//static boolean useinterpic;
static INT32 timer;
static INT32 intertic;
@@ -392,9 +392,16 @@ void Y_IntermissionDrawer(void)
if (!usebuffer)
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
if (useinterpic)
V_DrawScaledPatch(0, 0, 0, interpic);
else if (!usetile)
if (cv_betainterscreen.value
#ifdef HWRENDER
|| (rendermode == render_opengl && cv_grscreentextures.value != 2) // use the neato kart bg for intermission on disabled screen textures
#endif
)
V_DrawPatchFill(bgtile); // use the neato kart bg for intermission on disabled screen textures
//else if (useinterpic)
//V_DrawScaledPatch(0, 0, 0, interpic);
//else if (!usetile)
else
{
if (rendermode == render_soft && usebuffer)
VID_BlitLinearScreen(screens[1], screens[0], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
@@ -412,8 +419,8 @@ void Y_IntermissionDrawer(void)
V_DrawScaledPatch(0, 0, 0, bgpatch);
}
}
else if (bgtile)
V_DrawPatchFill(bgtile);
//else if (bgtile)
//V_DrawPatchFill(bgtile);
if (usebuffer) // Fade everything out
V_DrawFadeScreen(0xFF00, 22);
@@ -937,8 +944,8 @@ void Y_StartIntermission(void)
//if (intertype == int_race || intertype == int_match)
{
//bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
usetile = useinterpic = false;
bgtile = W_CachePatchName("SRB2BACK", PU_STATIC);
//usetile = useinterpic = false;
usebuffer = true;
}
@@ -988,7 +995,7 @@ static void Y_UnloadData(void)
UNLOAD(bgpatch);
UNLOAD(widebgpatch);
UNLOAD(bgtile);
UNLOAD(interpic);
//UNLOAD(interpic);
}
// SRB2Kart: Voting!