From 92bf8c07880dc8c68c89fcee5b1326593e8134e5 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 02:01:02 +0200 Subject: [PATCH 01/20] Make votescreen backgrounds resolution and dup independant also some slight cleanup currently this scales vertically to fill out the screen vertically not sure if horizontally would be preferred, but thatd most likely cut off alot of parts from some votebgs --- src/v_video.c | 8 ++++++++ src/v_video.h | 1 + src/y_inter.c | 28 +++++++++++++--------------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index 65fcc3440..9bc09dd98 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1562,6 +1562,14 @@ void V_DrawPatchFill(patch_t *pat) } } +// Draws a patch and scales it to fill out the screen vertically while remaining centered +void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) +{ + fixed_t scale = FixedDiv(vid.height << FRACBITS, patch->height << FRACBITS); + fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths + V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); +} + void V_DrawVhsEffect(boolean rewind) { static fixed_t upbary = 100*FRACUNIT, downbary = 150*FRACUNIT; diff --git a/src/v_video.h b/src/v_video.h index 00d0f6cb2..6b695b9c1 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -282,6 +282,7 @@ typedef struct player_s player_t; void V_DoPostProcessor(INT32 view, INT32 param); void V_DrawPatchFill(patch_t *pat); +void V_DrawCenteredScaledFullScreenPatch(patch_t *patch); void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT32 height, size_t srcrowbytes, size_t destrowbytes); diff --git a/src/y_inter.c b/src/y_inter.c index 980ed0294..05357d237 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -912,35 +912,35 @@ static void Y_UnloadData(void) // static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch) { + patch_t *votebg = NULL; char tempAnimPrefix[7]; - widePatch ? strcpy(tempAnimPrefix, animWidePrefix) : strcpy(tempAnimPrefix, animPrefix); - const INT32 tempFoundAnimVoteFrames = widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames; + strcpy(tempAnimPrefix, (widePatch ? animWidePrefix : animPrefix)); + const INT32 tempFoundAnimVoteFrames = (widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1; // Just in case someone provides LESS widescreen frames than normal frames or vice versa, reset the frame counter to 0 - if (currentAnimFrame > tempFoundAnimVoteFrames - 1) + if (currentAnimFrame > tempFoundAnimVoteFrames) currentAnimFrame = 0; - patch_t *background = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_PATCH); - V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (background->width/2), // Keep the width/height adjustments, for screens that are less wide than 320(?) - (vid.height / vid.dupy) - background->height, - V_SNAPTOTOP|V_SNAPTOLEFT, background); + votebg = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_PATCH); - if (renderisnewtic && votetic % 2 == 0 && !paused) - currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames - 1) ? 0 : currentAnimFrame + 1; + V_DrawCenteredScaledFullScreenPatch(votebg); + + if (renderisnewtic && (votetic % 2 == 0) && !paused) + currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames) ? 0 : (currentAnimFrame + 1); } static void Y_DrawVoteScreenPatch(void) { + patch_t *votebg = NULL; const boolean widescreen = (vid.width / vid.dupx > 320); - const boolean animvote = (foundAnimVoteWideFrames || foundAnimVoteFrames); - if (animvote) + if (foundAnimVoteWideFrames || foundAnimVoteFrames) { Y_DrawAnimatedVoteScreenPatch((foundAnimVoteWideFrames && widescreen)); return; } - patch_t *votebg = bgpatch; // non widescreen patch + votebg = bgpatch; // non widescreen patch UINT8 prefgametype = (votelevels[0][1] & ~0x80); const boolean widebgreplaced = (prefgametype == GT_MATCH) ? widebattlereplaced : wideracereplaced; @@ -952,9 +952,7 @@ static void Y_DrawVoteScreenPatch(void) votebg = widebgpatch; } - V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (votebg->width/2), - (vid.height / vid.dupy) - votebg->height, - V_SNAPTOTOP|V_SNAPTOLEFT, votebg); + V_DrawCenteredScaledFullScreenPatch(votebg); } // -- 2.54.0 From 5a6a954d4fb3393781cbc40c993bf2ff27d56806 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 15:51:41 +0200 Subject: [PATCH 02/20] make an adaptive votescreen patch scaler attempts to first fill the screen horizontally, if the screen is not filled vertically like that, it will then change the scaling to fill the screen vertically like this effectively every votebg fills up the screen and accomidates most bgs that added padding for the weird vanilla behaviour TODO: make the behaviour switchable --- src/v_video.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/v_video.c b/src/v_video.c index 9bc09dd98..de330cfa5 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1563,13 +1563,51 @@ void V_DrawPatchFill(patch_t *pat) } // Draws a patch and scales it to fill out the screen vertically while remaining centered -void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) +/*void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) { fixed_t scale = FixedDiv(vid.height << FRACBITS, patch->height << FRACBITS); fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); } +void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) +{ + fixed_t scale = FixedDiv(vid.width << FRACBITS, patch->width << FRACBITS); + + fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); + + fixed_t y = (vid.height << FRACBITS) - scaled_height; + + if (scaled_height < (vid.height << FRACBITS)) + { + y /= 2; + } + + V_DrawFixedPatch(0, y, scale, V_NOSCALEPATCH, patch, NULL); +}*/ + +void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) +{ + fixed_t x = 0, y = 0, scale = FRACUNIT; + + //scale = FixedDiv(vid.width << FRACBITS, patch->width << FRACBITS); // fit the screen horizontally + scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally + + + fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); + + // however, if this means the patch doesent fill out the screen vertically then + if (scaled_height < (vid.height << FRACBITS)) + { + scale = ((vid.height * FRACUNIT) / patch->height); // scale it to fit the screen vertically + x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; + } + else + y = (vid.height << FRACBITS) - scaled_height; + + V_DrawFixedPatch(x, y, scale, V_NOSCALEPATCH, patch, NULL); +} + void V_DrawVhsEffect(boolean rewind) { static fixed_t upbary = 100*FRACUNIT, downbary = 150*FRACUNIT; -- 2.54.0 From c47c6aa6e4efa7ffb0fb9fbe08325844d47676b2 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 16:06:15 +0200 Subject: [PATCH 03/20] make votebg scaling behaviour changable --- src/screen.c | 5 +++++ src/screen.h | 2 ++ src/v_video.c | 56 ++++++++++++++++++++++++++------------------------- src/v_video.h | 5 ++++- src/y_inter.c | 26 ++++++++++++++++++++++-- 5 files changed, 64 insertions(+), 30 deletions(-) diff --git a/src/screen.c b/src/screen.c index 0a9468d25..0cb27dfad 100644 --- a/src/screen.c +++ b/src/screen.c @@ -65,6 +65,9 @@ consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, consvar_t cv_vhseffect = {"vhspause", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_shittyscreen = {"televisionsignal", "Okay", CV_NOSHOWHELP, shittyscreen_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +static CV_PossibleValue_t votescale_cons_t[] = {{0, "Vanilla"}, {1, "Adaptive"}, {1, "VerticalFill"}, {1, "HorizontalFill"}, {0, NULL}}; +consvar_t cv_votebgscaling = {"votebgscaling", "Adaptive", CV_SAVE, votescale_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; + static void Highreshudscale_OnChange(void); static CV_PossibleValue_t highreshudscale_cons_t[] = {{4*FRACUNIT/5, "MIN"}, {6*FRACUNIT/5, "MAX"}, {0, NULL}}; consvar_t cv_highreshudscale = {"highreshudscale", "1", CV_SAVE|CV_FLOAT|CV_CALL|CV_NOINIT|CV_NOSHOWHELP, highreshudscale_cons_t, Highreshudscale_OnChange, 0, NULL, NULL, 0, 0, NULL}; @@ -216,6 +219,8 @@ void SCR_Startup(void) CV_RegisterVar(&cv_bsaturation); CV_RegisterVar(&cv_msaturation); + CV_RegisterVar(&cv_votebgscaling); + V_SetPalette(0); } diff --git a/src/screen.h b/src/screen.h index 4a97e159b..224897def 100644 --- a/src/screen.h +++ b/src/screen.h @@ -153,6 +153,8 @@ extern consvar_t cv_timescale; extern consvar_t cv_alwaysgrabmouse; +extern consvar_t cv_votebgscaling; + // quick fix for tall/short skies, depending on bytesperpixel extern void (*walldrawerfunc)(void); diff --git a/src/v_video.c b/src/v_video.c index de330cfa5..9ce67dde6 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1562,38 +1562,13 @@ void V_DrawPatchFill(patch_t *pat) } } -// Draws a patch and scales it to fill out the screen vertically while remaining centered -/*void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) -{ - fixed_t scale = FixedDiv(vid.height << FRACBITS, patch->height << FRACBITS); - fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths - V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); -} - -void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) -{ - fixed_t scale = FixedDiv(vid.width << FRACBITS, patch->width << FRACBITS); - - fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); - - fixed_t y = (vid.height << FRACBITS) - scaled_height; - - if (scaled_height < (vid.height << FRACBITS)) - { - y /= 2; - } - - V_DrawFixedPatch(0, y, scale, V_NOSCALEPATCH, patch, NULL); -}*/ - -void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) +// Draws a patch and tries to always fill the screen with the patch +void V_DrawAdaptiveScaledFullScreenPatch(patch_t *patch) { fixed_t x = 0, y = 0, scale = FRACUNIT; - //scale = FixedDiv(vid.width << FRACBITS, patch->width << FRACBITS); // fit the screen horizontally scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally - fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); // however, if this means the patch doesent fill out the screen vertically then @@ -1608,6 +1583,33 @@ void V_DrawCenteredScaledFullScreenPatch(patch_t *patch) V_DrawFixedPatch(x, y, scale, V_NOSCALEPATCH, patch, NULL); } +// Draws a patch and scales it to fill out the screen vertically while remaining centered +void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch) +{ + fixed_t scale = ((vid.height * FRACUNIT) / patch->height); + fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths + V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); +} + +// Draws a patch and scales it to fill out the screen horizontally +// centers the patch when its too small to fit the screen vertically +void V_DrawHorizontallyScaledFullScreenPatch(patch_t *patch) +{ + fixed_t scale = ((vid.width * FRACUNIT) / patch->width); + + fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); + + fixed_t y = (vid.height << FRACBITS) - scaled_height; + + // center it if it does not fit the screen vertically + if (scaled_height < (vid.height << FRACBITS)) + { + y /= 2; + } + + V_DrawFixedPatch(0, y, scale, V_NOSCALEPATCH, patch, NULL); +} + void V_DrawVhsEffect(boolean rewind) { static fixed_t upbary = 100*FRACUNIT, downbary = 150*FRACUNIT; diff --git a/src/v_video.h b/src/v_video.h index 6b695b9c1..3a8cf7396 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -282,7 +282,10 @@ typedef struct player_s player_t; void V_DoPostProcessor(INT32 view, INT32 param); void V_DrawPatchFill(patch_t *pat); -void V_DrawCenteredScaledFullScreenPatch(patch_t *patch); + +void V_DrawAdaptiveScaledFullScreenPatch(patch_t *patch); +void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch); +void V_DrawHorizontallyScaledFullScreenPatch(patch_t *patch); void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT32 height, size_t srcrowbytes, size_t destrowbytes); diff --git a/src/y_inter.c b/src/y_inter.c index 05357d237..48edf3a9e 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -906,6 +906,28 @@ static void Y_UnloadData(void) // SRB2Kart: Voting! +static void Y_DrawVoteBackground(patch_t *patch) +{ + switch (cv_votebgscaling.value) + { + case 1: // adaptive + V_DrawAdaptiveScaledFullScreenPatch(patch); + break; + case 2: // vertical-fill + V_DrawVerticallyScaledFullScreenPatch(patch); + break; + case 3: // horizontal-fill + V_DrawHorizontallyScaledFullScreenPatch(patch); + break; + case 0: // vanilla + default: + V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (patch->width/2), + (vid.height / vid.dupy) - patch->height, + V_SNAPTOTOP|V_SNAPTOLEFT, patch); + break; + } +} + // Y_DrawAnimatedVoteScreenPatch // // Draw animated patch based on frame counter on vote screen @@ -923,7 +945,7 @@ static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch) votebg = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_PATCH); - V_DrawCenteredScaledFullScreenPatch(votebg); + Y_DrawVoteBackground(votebg); if (renderisnewtic && (votetic % 2 == 0) && !paused) currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames) ? 0 : (currentAnimFrame + 1); @@ -952,7 +974,7 @@ static void Y_DrawVoteScreenPatch(void) votebg = widebgpatch; } - V_DrawCenteredScaledFullScreenPatch(votebg); + Y_DrawVoteBackground(votebg); } // -- 2.54.0 From 5b6e7abd91b5cddaefefd6b6176bd17b241bb870 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 16:09:59 +0200 Subject: [PATCH 04/20] fix copy paste error oops --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 0cb27dfad..cef838aaa 100644 --- a/src/screen.c +++ b/src/screen.c @@ -65,7 +65,7 @@ consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, consvar_t cv_vhseffect = {"vhspause", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_shittyscreen = {"televisionsignal", "Okay", CV_NOSHOWHELP, shittyscreen_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; -static CV_PossibleValue_t votescale_cons_t[] = {{0, "Vanilla"}, {1, "Adaptive"}, {1, "VerticalFill"}, {1, "HorizontalFill"}, {0, NULL}}; +static CV_PossibleValue_t votescale_cons_t[] = {{0, "Vanilla"}, {1, "Adaptive"}, {2, "VerticalFill"}, {3, "HorizontalFill"}, {0, NULL}}; consvar_t cv_votebgscaling = {"votebgscaling", "Adaptive", CV_SAVE, votescale_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static void Highreshudscale_OnChange(void); -- 2.54.0 From c2a761c895101ed22dcb6882ac0432b1081be95b Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 16:35:36 +0200 Subject: [PATCH 05/20] delet some clutter in screen.c --- src/screen.c | 56 +++++++++++----------------------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/src/screen.c b/src/screen.c index 0a9468d25..de9c2aa0a 100644 --- a/src/screen.c +++ b/src/screen.c @@ -106,41 +106,18 @@ void SCR_SetMode(void) V_SetPalette(0); - // - // setup the right draw routines for either 8bpp or 16bpp - // - if (true)//vid.bpp == 1) //Always run in 8bpp. todo: remove all 16bpp code? - { - spanfunc = basespanfunc = R_DrawSpan_8; - splatfunc = R_DrawSplat_8; - transcolfunc = R_DrawTranslatedColumn_8; - transtransfunc = R_DrawTranslatedTranslucentColumn_8; + spanfunc = basespanfunc = R_DrawSpan_8; + splatfunc = R_DrawSplat_8; + transcolfunc = R_DrawTranslatedColumn_8; + transtransfunc = R_DrawTranslatedTranslucentColumn_8; - colfunc = basecolfunc = R_DrawColumn_8; - shadecolfunc = R_DrawShadeColumn_8; - fuzzcolfunc = R_DrawTranslucentColumn_8; - walldrawerfunc = R_DrawWallColumn_8; - twosmultipatchfunc = R_Draw2sMultiPatchColumn_8; - twosmultipatchtransfunc = R_Draw2sMultiPatchTranslucentColumn_8; - } -/* else if (vid.bpp > 1) - { - I_OutputMsg("using highcolor mode\n"); - spanfunc = basespanfunc = R_DrawSpan_16; - transcolfunc = R_DrawTranslatedColumn_16; - transtransfunc = R_DrawTranslucentColumn_16; // No 16bit operation for this function + colfunc = basecolfunc = R_DrawColumn_8; + shadecolfunc = R_DrawShadeColumn_8; + fuzzcolfunc = R_DrawTranslucentColumn_8; + walldrawerfunc = R_DrawWallColumn_8; + twosmultipatchfunc = R_Draw2sMultiPatchColumn_8; + twosmultipatchtransfunc = R_Draw2sMultiPatchTranslucentColumn_8; - colfunc = basecolfunc = R_DrawColumn_16; - shadecolfunc = NULL; // detect error if used somewhere.. - fuzzcolfunc = R_DrawTranslucentColumn_16; - walldrawerfunc = R_DrawWallColumn_16; - }*/ - else - I_Error("unknown bytes per pixel mode %d\n", vid.bpp); -/* - if (SCR_IsAspectCorrect(vid.width, vid.height)) - CONS_Alert(CONS_WARNING, M_GetText("Resolution is not aspect-correct!\nUse a multiple of %dx%d\n"), BASEVIDWIDTH, BASEVIDHEIGHT); -*/ // set the apprpriate drawer for the sky (tall or INT16) setmodeneeded = 0; } @@ -164,10 +141,7 @@ void SCR_Startup(void) vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT); vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT); -//#ifdef HWRENDER - //if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl -//#endif - vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); + vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); vid.meddupx = (UINT8)(vid.dupx >> 1) + 1; vid.meddupy = (UINT8)(vid.dupy >> 1) + 1; @@ -245,13 +219,7 @@ void SCR_Recalc(void) vid.fdupy = FixedDiv(vid.fdupy, cv_highreshudscale.value); } -#ifdef HWRENDER - //if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl - // 13/11/18: - // The above is no longer necessary, since we want OpenGL to be just like software now - // -- Monster Iestyn -#endif - vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); + vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); //vid.baseratio = FixedDiv(vid.height << FRACBITS, BASEVIDHEIGHT << FRACBITS); vid.baseratio = FRACUNIT; -- 2.54.0 From 044836b026864e07adc8f45e87b7b21c0f47ae13 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 14 May 2025 19:28:06 +0200 Subject: [PATCH 06/20] change gamepad powerup led behavior it will instead always take the players mobj color, this makes it indirectly support things like acrobatics and the colourized banana snipe also just makes it a value for cv_gamepadled instead of its own cvar --- src/d_netcmd.c | 1 - src/g_input.c | 45 ++++++++++++++++++--------------------------- src/g_input.h | 1 - src/m_menu.c | 20 ++++++++------------ 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 69df66500..df909990b 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1027,7 +1027,6 @@ void D_RegisterClientCommands(void) { CV_RegisterVar(&cv_rumble[i]); CV_RegisterVar(&cv_gamepadled[i]); - CV_RegisterVar(&cv_ledpowerup[i]); } CV_RegisterVar(&cv_usemouse); diff --git a/src/g_input.c b/src/g_input.c index 963663504..43b7f48ca 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -58,44 +58,35 @@ consvar_t cv_rumble[MAXSPLITSCREENPLAYERS] = { {"rumble4", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, rumble_off_handle4, 0, NULL, NULL, 0, 0, NULL} }; +static CV_PossibleValue_t gamepadled_cons_t[] = {{0, "Off"}, {1, "Skincolor"}, {2, "Mobjcolor"}, {0, NULL}}; consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS] = { - {"gamepadled", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle, 0, NULL, NULL, 0, 0, NULL}, - {"gamepadled2", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle2, 0, NULL, NULL, 0, 0, NULL}, - {"gamepadled3", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle3, 0, NULL, NULL, 0, 0, NULL}, - {"gamepadled4", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle4, 0, NULL, NULL, 0, 0, NULL} -}; - -consvar_t cv_ledpowerup[MAXSPLITSCREENPLAYERS] = { - {"ledpowerup", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle, 0, NULL, NULL, 0, 0, NULL}, - {"ledpowerup2", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle2, 0, NULL, NULL, 0, 0, NULL}, - {"ledpowerup3", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle3, 0, NULL, NULL, 0, 0, NULL}, - {"ledpowerup4", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle4, 0, NULL, NULL, 0, 0, NULL} + {"gamepadled", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle, 0, NULL, NULL, 0, 0, NULL}, + {"gamepadled2", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle2, 0, NULL, NULL, 0, 0, NULL}, + {"gamepadled3", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle3, 0, NULL, NULL, 0, 0, NULL}, + {"gamepadled4", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle4, 0, NULL, NULL, 0, 0, NULL} }; static void rumble_off_handle(void) { - if (cv_rumble[0].value == 0) + if (!cv_rumble[0].value) G_ResetPlayerDeviceRumble(0); } - static void rumble_off_handle2(void) { - if (cv_rumble[1].value == 0) + if (!cv_rumble[1].value) G_ResetPlayerDeviceRumble(1); } - static void rumble_off_handle3(void) { - if (cv_rumble[2].value == 0) + if (!cv_rumble[2].value) G_ResetPlayerDeviceRumble(2); } - static void rumble_off_handle4(void) { - if (cv_rumble[3].value == 0) + if (!cv_rumble[3].value) G_ResetPlayerDeviceRumble(3); } @@ -104,19 +95,16 @@ static void led_off_handle(void) G_ResetPlayerGamepadIndicatorColor(0); } - static void led_off_handle2(void) { G_ResetPlayerGamepadIndicatorColor(1); } - static void led_off_handle3(void) { G_ResetPlayerGamepadIndicatorColor(2); } - static void led_off_handle4(void) { G_ResetPlayerGamepadIndicatorColor(3); @@ -900,13 +888,16 @@ UINT16 G_GetSkinColor(INT32 playernum) { player_t *player = &players[displayplayers[playernum]]; - // make rgb rainbow vomit when invul or flash blue when grow - if (cv_ledpowerup[playernum].value && player->mo && (player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_growshrinktimer] || player->powers[pw_invulnerability])) - return player->mo->color; + if (player) + { + // make rgb rainbow vomit when invul or flash blue when grow + if ((cv_gamepadled[playernum].value == 2) && player->mo && player->mo->color) + return player->mo->color; - // take actual player skincolour when ingame - if (player->skincolor) - return player->skincolor; + // take actual player skincolour when ingame + if (player->skincolor) + return player->skincolor; + } } // otherwise just fallback to whatever the cvar is diff --git a/src/g_input.h b/src/g_input.h index 478dae8f1..d801d1020 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -109,7 +109,6 @@ extern consvar_t cv_mousesens, cv_mouseysens; extern consvar_t cv_controlperkey, cv_turnsmooth; extern consvar_t cv_rumble[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS]; -extern consvar_t cv_ledpowerup[MAXSPLITSCREENPLAYERS]; extern INT32 mousex, mousey; extern INT32 mlooky; //mousey with mlookSensitivity diff --git a/src/m_menu.c b/src/m_menu.c index b8198b650..8dadbdd98 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1290,8 +1290,7 @@ static menuitem_t OP_Joystick1Menu[] = {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[0] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to skin color" , &cv_gamepadled[0] , 125}, - {IT_STRING | IT_CVAR, NULL, "Flash LED on powerups" , &cv_ledpowerup[0] , 130}, + {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[0] , 125}, }; static menuitem_t OP_Joystick2Menu[] = @@ -1321,8 +1320,7 @@ static menuitem_t OP_Joystick2Menu[] = {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[1] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to skin color" , &cv_gamepadled[1] , 125}, - {IT_STRING | IT_CVAR, NULL, "Flash LED on powerups" , &cv_ledpowerup[1] , 130}, + {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[1] , 125}, }; static menuitem_t OP_Joystick3Menu[] = @@ -1352,8 +1350,7 @@ static menuitem_t OP_Joystick3Menu[] = {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[2] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to skin color" , &cv_gamepadled[2] , 125}, - {IT_STRING | IT_CVAR, NULL, "Flash LED on powerups" , &cv_ledpowerup[2] , 130}, + {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[2] , 125}, }; static menuitem_t OP_Joystick4Menu[] = @@ -1383,8 +1380,7 @@ static menuitem_t OP_Joystick4Menu[] = {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[3] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to skin color" , &cv_gamepadled[3] , 125}, - {IT_STRING | IT_CVAR, NULL, "Flash LED on powerups" , &cv_ledpowerup[3] , 130}, + {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[3] , 125}, }; static menuitem_t OP_JoystickSetMenu[] = @@ -3178,10 +3174,10 @@ menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDe //WTF menu_t OP_MouseOptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_MouseOptionsMenu, &OP_ControlsDef, 60, 30); menu_t OP_AllControlsDef = CONTROLMENUSTYLE(OP_AllControlsMenu, &OP_ControlsDef); -menu_t OP_Joystick1Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_AllControlsDef, 60, 36); -menu_t OP_Joystick2Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_AllControlsDef, 60, 36); -menu_t OP_Joystick3Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_AllControlsDef, 60, 36); -menu_t OP_Joystick4Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_AllControlsDef, 60, 36); +menu_t OP_Joystick1Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_AllControlsDef, 30, 36); +menu_t OP_Joystick2Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_AllControlsDef, 30, 36); +menu_t OP_Joystick3Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_AllControlsDef, 30, 36); +menu_t OP_Joystick4Def = DEFAULTSCROLLSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_AllControlsDef, 30, 36); menu_t OP_JoystickSetDef = { "M_CONTRO", -- 2.54.0 From f0579de24499904a3a14580ef1d3c6abdc97fbc4 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 15 May 2025 01:24:36 +0200 Subject: [PATCH 07/20] HWR_UsePortals --- src/hardware/hw_main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index ea5b9f522..0c1d13379 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2166,6 +2166,11 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom //Hurdler: end of 3d-floors test } +static inline boolean HWR_UsePortals(void) +{ + return cv_glportals.value && gl_maphasportals; +} + // From PrBoom: // // e6y: Check whether the player can look beyond this line, returns true if we can't @@ -2226,7 +2231,8 @@ static boolean CheckClip(sector_t * afrontsector, sector_t * abacksector) } // using this check with portals causes weird culling issues on ante-station - if (LIKELY(!portalclipline) && (afrontsector == viewsector || abacksector == viewsector)) + if (LIKELY(!portalclipline) && + (afrontsector == viewsector || abacksector == viewsector)) { fixed_t viewf1, viewf2, viewc1, viewc2; if (afrontsector == viewsector) @@ -2292,7 +2298,8 @@ static boolean CheckClip(sector_t * afrontsector, sector_t * abacksector) // Window. // We know it's a window when the above isn't true and the back and front sectors don't match - if (backc1 != frontc1 || backc2 != frontc2 || backf1 != frontf1 || backf2 != frontf2) + if (backc1 != frontc1 || backc2 != frontc2 + || backf1 != frontf1 || backf2 != frontf2) { checkforemptylines = false; return false; @@ -2359,7 +2366,7 @@ static void HWR_AddLine(seg_t *line) gl_backsector = line->backsector; - if (!cv_glportals.value || LIKELY(!gl_maphasportals)) + if (LIKELY(!HWR_UsePortals())) { doaddline: if (!line->backsector) @@ -5408,7 +5415,7 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, player_t *pl gl_portallist_t portallist; const boolean skybox = (skyboxmo[0] && cv_skybox.value); - const boolean useportals = cv_glportals.value && gl_maphasportals && allow_portals; + const boolean useportals = HWR_UsePortals() && allow_portals; bspfunc bspFunc = (useportals && portalclipline) ? HWR_RenderPortalBSPNode : HWR_RenderBSPNode; portallist.base = portallist.cap = NULL; -- 2.54.0 From b1baa90b19f0bea43860a720f7d5bbc7ba290ddd Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 15 May 2025 01:26:04 +0200 Subject: [PATCH 08/20] move paletterender walllight stuff into HWR_CalcWallLight just slightly cleaner --- src/hardware/hw_main.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 0c1d13379..af2074977 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -481,11 +481,11 @@ static UINT8 HWR_FogBlockAlpha(INT32 light, extracolormap_t *colormap) // Let's return surfcolor.s.alpha; } -static FUINT HWR_CalcWallLight(FUINT lightnum, seg_t *seg) +static FUINT HWR_CalcWallLight(FUINT lightnum, seg_t *seg, extracolormap_t *colormap) { INT16 finallight = lightnum; - if (cv_glfakecontrast.value == 0) + if (cv_glfakecontrast.value == 0 || (HWR_ShouldUsePaletteRendering() && colormap)) return (FUINT)finallight; if (seg != NULL && P_ApplyLightOffsetFine(lightnum, seg->frontsector)) @@ -698,8 +698,7 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool for (i = 0, v3d = planeVerts; i < (INT32)nrPlaneVerts; i++,v3d++,pv++) SETUP3DVERT(v3d, pv->x, pv->y); - if (slope) - lightlevel = HWR_CalcSlopeLight(lightlevel, slope, gl_frontsector, (FOFsector != NULL)); + lightlevel = HWR_CalcSlopeLight(lightlevel, slope, gl_frontsector, (FOFsector != NULL)); HWR_Lighting(&Surf, lightlevel, planecolormap, P_SectorUsesDirectionalLighting(gl_frontsector)); @@ -1008,7 +1007,7 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, fixed_t v2y = FloatToFixed(wallVerts[1].z); const UINT8 alpha = Surf->PolyColor.s.alpha; - FUINT lightnum = HWR_CalcWallLight(sector->lightlevel, gl_curline); + FUINT lightnum = HWR_CalcWallLight(sector->lightlevel, gl_curline, NULL); extracolormap_t *colormap = NULL; realtop = top = wallVerts[3].y; @@ -1051,14 +1050,14 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, { lightnum = pfloor->master->frontsector->lightlevel; colormap = pfloor->master->frontsector->extra_colormap; - lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline); } else { lightnum = *list[i].lightlevel; colormap = list[i].extra_colormap; - lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline); } + + lightnum = HWR_CalcWallLight(lightnum, gl_curline, colormap); } boolean solid = false; @@ -1388,7 +1387,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom FUINT lightnum = gl_frontsector->lightlevel; extracolormap_t *colormap = gl_frontsector->extra_colormap; - lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline); + lightnum = HWR_CalcWallLight(lightnum, gl_curline, colormap); FSurfaceInfo Surf; @@ -2015,7 +2014,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(lightnum, colormap); - lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline); + lightnum = HWR_CalcWallLight(lightnum, gl_curline, colormap); if (gl_frontsector->numlights) HWR_SplitWall(gl_frontsector, wallVerts, 0, false, &Surf, roverflags, rover, blendmode); @@ -2132,7 +2131,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(lightnum, colormap); - lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline); + lightnum = HWR_CalcWallLight(lightnum, gl_curline, colormap); if (gl_backsector->numlights) HWR_SplitWall(gl_backsector, wallVerts, 0, false, &Surf, roverflags, rover, blendmode); -- 2.54.0 From 5f40ff5a0349fa97c9cc25dc10d89c4155935460 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 15 May 2025 01:23:44 +0200 Subject: [PATCH 09/20] those appear to do nothing free performance ig? --- src/hardware/hw_main.c | 5 ----- src/r_bsp.c | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index af2074977..1828b5f60 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2315,9 +2315,6 @@ static void HWR_AddLine(seg_t *line) { angle_t angle1, angle2; - // SoM: Backsector needs to be run through R_FakeFlat - static sector_t tempsec; - fixed_t v1x, v1y, v2x, v2y; // the seg's vertexes as fixed_t boolean dont_draw = false; @@ -2374,8 +2371,6 @@ doaddline: } else { - gl_backsector = R_FakeFlat(gl_backsector, &tempsec, NULL, NULL, true); - if (CheckClip(gl_frontsector, gl_backsector)) { gld_clipper_SafeAddClipRange(angle2, angle1); diff --git a/src/r_bsp.c b/src/r_bsp.c index 427a6367c..bc8c124ee 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -388,7 +388,6 @@ static void R_AddLine(seg_t *line) { INT32 x1, x2; angle_t angle1, angle2, span, tspan; - static sector_t tempsec; g_portal = NULL; @@ -472,8 +471,6 @@ static void R_AddLine(seg_t *line) if (!backsector) goto clipsolid; - backsector = R_FakeFlat(backsector, &tempsec, NULL, NULL, true); - doorclosed = 0; fixed_t frontf1,frontf2, frontc1, frontc2; // front floor/ceiling ends -- 2.54.0 From 1ed76de58a267d924c8dde0d333cbff887e60606 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 15 May 2025 04:12:40 +0200 Subject: [PATCH 10/20] macrofy redundant splitscreen menus joystick and camera menus to be specific --- src/m_menu.c | 229 +++++++++++++-------------------------------------- 1 file changed, 58 insertions(+), 171 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 8dadbdd98..4e951261a 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1263,149 +1263,74 @@ static menuitem_t OP_AllControlsMenu[] = {IT_CONTROL, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 }, }; +#define OP_JOYMENU(pnum) \ + {IT_HEADER, NULL, "Gameplay Controls", NULL, 7}, \ + {IT_STRING | IT_CVAR, NULL, "Aim Forward/Back" , &cv_aimaxis[pnum] , 15}, \ + {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_turnaxis[pnum] , 20}, \ + {IT_STRING | IT_CVAR, NULL, "Accelerate" , &cv_moveaxis[pnum] , 25}, \ + {IT_STRING | IT_CVAR, NULL, "Brake" , &cv_brakeaxis[pnum] , 30}, \ + {IT_STRING | IT_CVAR, NULL, "Drift" , &cv_driftaxis[pnum] , 35}, \ + {IT_STRING | IT_CVAR, NULL, "Use Item" , &cv_fireaxis[pnum] , 40}, \ + {IT_STRING | IT_CVAR, NULL, "Look Backward" , &cv_lookbackaxis[pnum] , 45}, \ + {IT_STRING | IT_CVAR, NULL, "Custom Button 1" , &cv_custom1axis[pnum] , 50}, \ + {IT_STRING | IT_CVAR, NULL, "Custom Button 2" , &cv_custom2axis[pnum] , 55}, \ + {IT_STRING | IT_CVAR, NULL, "Custom Button 3" , &cv_custom3axis[pnum] , 60}, \ + {IT_HEADER, NULL, "Camera Controls", NULL, 67}, \ + {IT_STRING | IT_CVAR, NULL, "Look Up/Down" , &cv_lookaxis[pnum] , 75}, \ + {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_camturnaxis[pnum] , 80}, \ + {IT_STRING | IT_CVAR, NULL, "Strafe Left/Right" , &cv_camstrafeaxis[pnum] , 85}, \ + {IT_HEADER, NULL, "Deadzones", NULL, 92}, \ + {IT_STRING | IT_CVAR, NULL, "X deadzone" , &cv_xdeadzone[pnum] , 100}, \ + {IT_STRING | IT_CVAR, NULL, "Y deadzone" , &cv_ydeadzone[pnum] , 105}, \ + {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, \ + {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[pnum] , 120}, \ + {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[pnum] , 125}, + static menuitem_t OP_Joystick1Menu[] = { - {IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup1PJoystickMenu , 0}, - - {IT_HEADER, NULL, "Gameplay Controls", NULL, 7}, - {IT_STRING | IT_CVAR, NULL, "Aim Forward/Back" , &cv_aimaxis[0] , 15}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_turnaxis[0] , 20}, - {IT_STRING | IT_CVAR, NULL, "Accelerate" , &cv_moveaxis[0] , 25}, - {IT_STRING | IT_CVAR, NULL, "Brake" , &cv_brakeaxis[0] , 30}, - {IT_STRING | IT_CVAR, NULL, "Drift" , &cv_driftaxis[0] , 35}, - {IT_STRING | IT_CVAR, NULL, "Use Item" , &cv_fireaxis[0] , 40}, - {IT_STRING | IT_CVAR, NULL, "Look Backward" , &cv_lookbackaxis[0] , 45}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 1" , &cv_custom1axis[0] , 50}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 2" , &cv_custom2axis[0] , 55}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 3" , &cv_custom3axis[0] , 60}, - - {IT_HEADER, NULL, "Camera Controls", NULL, 67}, - {IT_STRING | IT_CVAR, NULL, "Look Up/Down" , &cv_lookaxis[0] , 75}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_camturnaxis[0] , 80}, - {IT_STRING | IT_CVAR, NULL, "Strafe Left/Right" , &cv_camstrafeaxis[0] , 85}, - - {IT_HEADER, NULL, "Deadzones", NULL, 92}, - {IT_STRING | IT_CVAR, NULL, "X deadzone" , &cv_xdeadzone[0] , 100}, - {IT_STRING | IT_CVAR, NULL, "Y deadzone" , &cv_ydeadzone[0] , 105}, - - {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, - {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[0] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[0] , 125}, + {IT_STRING | IT_CALL, NULL, "Select Gamepad...", M_Setup1PJoystickMenu, 0}, + OP_JOYMENU(0) }; static menuitem_t OP_Joystick2Menu[] = { - {IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup2PJoystickMenu , 10}, - - {IT_HEADER, NULL, "Gameplay Controls", NULL, 7}, - {IT_STRING | IT_CVAR, NULL, "Aim Forward/Back" , &cv_aimaxis[1] , 15}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_turnaxis[1] , 20}, - {IT_STRING | IT_CVAR, NULL, "Accelerate" , &cv_moveaxis[1] , 25}, - {IT_STRING | IT_CVAR, NULL, "Brake" , &cv_brakeaxis[1] , 30}, - {IT_STRING | IT_CVAR, NULL, "Drift" , &cv_driftaxis[1] , 35}, - {IT_STRING | IT_CVAR, NULL, "Use Item" , &cv_fireaxis[1] , 40}, - {IT_STRING | IT_CVAR, NULL, "Look Backward" , &cv_lookbackaxis[1] , 45}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 1" , &cv_custom1axis[1] , 50}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 2" , &cv_custom2axis[1] , 55}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 3" , &cv_custom3axis[1] , 60}, - - {IT_HEADER, NULL, "Camera Controls", NULL, 67}, - {IT_STRING | IT_CVAR, NULL, "Look Up/Down" , &cv_lookaxis[1] , 75}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_camturnaxis[1] , 80}, - {IT_STRING | IT_CVAR, NULL, "Strafe Left/Right" , &cv_camstrafeaxis[1] , 85}, - - {IT_HEADER, NULL, "Deadzones", NULL, 92}, - {IT_STRING | IT_CVAR, NULL, "X deadzone" , &cv_xdeadzone[1] , 100}, - {IT_STRING | IT_CVAR, NULL, "Y deadzone" , &cv_ydeadzone[1] , 105}, - - {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, - {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[1] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[1] , 125}, + {IT_STRING | IT_CALL, NULL, "Select Gamepad...", M_Setup2PJoystickMenu, 0}, + OP_JOYMENU(1) }; static menuitem_t OP_Joystick3Menu[] = { - {IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup3PJoystickMenu , 10}, - - {IT_HEADER, NULL, "Gameplay Controls", NULL, 7}, - {IT_STRING | IT_CVAR, NULL, "Aim Forward/Back" , &cv_aimaxis[2] , 15}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_turnaxis[2] , 20}, - {IT_STRING | IT_CVAR, NULL, "Accelerate" , &cv_moveaxis[2] , 25}, - {IT_STRING | IT_CVAR, NULL, "Brake" , &cv_brakeaxis[2] , 30}, - {IT_STRING | IT_CVAR, NULL, "Drift" , &cv_driftaxis[2] , 35}, - {IT_STRING | IT_CVAR, NULL, "Use Item" , &cv_fireaxis[2] , 40}, - {IT_STRING | IT_CVAR, NULL, "Look Backward" , &cv_lookbackaxis[2] , 45}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 1" , &cv_custom1axis[2] , 50}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 2" , &cv_custom2axis[2] , 55}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 3" , &cv_custom3axis[2] , 60}, - - {IT_HEADER, NULL, "Camera Controls", NULL, 67}, - {IT_STRING | IT_CVAR, NULL, "Look Up/Down" , &cv_lookaxis[2] , 75}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_camturnaxis[2] , 80}, - {IT_STRING | IT_CVAR, NULL, "Strafe Left/Right" , &cv_camstrafeaxis[2] , 85}, - - {IT_HEADER, NULL, "Deadzones", NULL, 92}, - {IT_STRING | IT_CVAR, NULL, "X deadzone" , &cv_xdeadzone[2] , 100}, - {IT_STRING | IT_CVAR, NULL, "Y deadzone" , &cv_ydeadzone[2] , 105}, - - {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, - {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[2] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[2] , 125}, + {IT_STRING | IT_CALL, NULL, "Select Gamepad...", M_Setup3PJoystickMenu, 0}, + OP_JOYMENU(2) }; static menuitem_t OP_Joystick4Menu[] = { - {IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup4PJoystickMenu , 10}, - - {IT_HEADER, NULL, "Gameplay Controls", NULL, 7}, - {IT_STRING | IT_CVAR, NULL, "Aim Forward/Back" , &cv_aimaxis[3] , 15}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_turnaxis[3] , 20}, - {IT_STRING | IT_CVAR, NULL, "Accelerate" , &cv_moveaxis[3] , 25}, - {IT_STRING | IT_CVAR, NULL, "Brake" , &cv_brakeaxis[3] , 30}, - {IT_STRING | IT_CVAR, NULL, "Drift" , &cv_driftaxis[3] , 35}, - {IT_STRING | IT_CVAR, NULL, "Use Item" , &cv_fireaxis[3] , 40}, - {IT_STRING | IT_CVAR, NULL, "Look Backward" , &cv_lookbackaxis[3] , 45}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 1" , &cv_custom1axis[3] , 50}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 2" , &cv_custom2axis[3] , 55}, - {IT_STRING | IT_CVAR, NULL, "Custom Button 3" , &cv_custom3axis[3] , 60}, - - {IT_HEADER, NULL, "Camera Controls", NULL, 67}, - {IT_STRING | IT_CVAR, NULL, "Look Up/Down" , &cv_lookaxis[3] , 75}, - {IT_STRING | IT_CVAR, NULL, "Turn Left/Right" , &cv_camturnaxis[3] , 80}, - {IT_STRING | IT_CVAR, NULL, "Strafe Left/Right" , &cv_camstrafeaxis[3] , 85}, - - {IT_HEADER, NULL, "Deadzones", NULL, 92}, - {IT_STRING | IT_CVAR, NULL, "X deadzone" , &cv_xdeadzone[3] , 100}, - {IT_STRING | IT_CVAR, NULL, "Y deadzone" , &cv_ydeadzone[3] , 105}, - - {IT_HEADER, NULL, "Miscellaneous", NULL, 112}, - {IT_STRING | IT_CVAR, NULL, "Controller Rumble" , &cv_rumble[3] , 120}, - {IT_STRING | IT_CVAR, NULL, "Set LED to Player color", &cv_gamepadled[3] , 125}, + {IT_STRING | IT_CALL, NULL, "Select Gamepad...", M_Setup4PJoystickMenu, 0}, + OP_JOYMENU(3) }; static menuitem_t OP_JoystickSetMenu[] = { - {IT_CALL | IT_NOTHING, "None", NULL, M_AssignJoystick, LINEHEIGHT+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*2)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*3)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*4)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*5)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*6)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*7)+5}, - {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*8)+5}, + {IT_CALL | IT_NOTHING, "None", NULL, M_AssignJoystick, LINEHEIGHT+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*2)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*3)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*4)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*5)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*6)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*7)+5}, + {IT_CALL | IT_NOTHING, "", NULL, M_AssignJoystick, (LINEHEIGHT*8)+5}, }; //WTF static menuitem_t OP_MouseOptionsMenu[] = { - {IT_STRING | IT_CVAR, NULL, "Use Mouse", &cv_usemouse, 10}, + {IT_STRING | IT_CVAR, NULL, "Use Mouse", &cv_usemouse, 10}, - {IT_STRING | IT_CVAR, NULL, "Mouse Turning", &cv_mouseturn, 20}, - {IT_STRING | IT_CVAR, NULL, "Invert Mouse", &cv_invertmouse, 30}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Mouse X Speed", &cv_mousesens, 40}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Mouse Y Speed", &cv_mouseysens, 50}, + {IT_STRING | IT_CVAR, NULL, "Mouse Turning", &cv_mouseturn, 20}, + {IT_STRING | IT_CVAR, NULL, "Invert Mouse", &cv_invertmouse, 30}, + {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Mouse X Speed", &cv_mousesens, 40}, + {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Mouse Y Speed", &cv_mouseysens, 50}, }; static const char* OP_MouseTooltips[] = @@ -1946,76 +1871,38 @@ static const char* OP_CamOptionsTooltips[] = NULL, }; +#define OP_CAMMENU(pnum) \ +{IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[pnum], 30}, \ +{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[pnum], 50}, \ +{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[pnum], 60}, \ +{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[pnum], 70}, \ +{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[pnum], 90}, \ +{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[pnum], 100}, \ +{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[pnum], 120}, \ +{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[pnum], 135}, \ + static menuitem_t OP_Player1CamOptionsMenu[] = { {IT_HEADER, NULL, "Player 1 Camera Options", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[0], 30}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[0], 50}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[0], 60}, - {IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[0], 70}, - - {IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[0], 90}, - - {IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[0], 100}, - - {IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[0], 120}, - - {IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[0], 135}, + OP_CAMMENU(0) }; static menuitem_t OP_Player2CamOptionsMenu[] = { {IT_HEADER, NULL, "Player 2 Camera Options", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[1], 30}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[1], 50}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[1], 60}, - {IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[1], 70}, - - {IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[1], 90}, - - {IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[1], 100}, - - {IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[1], 120}, - - {IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[1], 135}, + OP_CAMMENU(1) }; static menuitem_t OP_Player3CamOptionsMenu[] = { {IT_HEADER, NULL, "Player 3 Camera Options", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[2], 30}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[2], 50}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[2], 60}, - {IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[2], 70}, - - {IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[2], 90}, - - {IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[2], 100}, - - {IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[2], 120}, - - {IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[2], 135}, + OP_CAMMENU(2) }; static menuitem_t OP_Player4CamOptionsMenu[] = { {IT_HEADER, NULL, "Player 4 Camera Options", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[3], 30}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[3], 50}, - {IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[3], 60}, - {IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[3], 70}, - - {IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[3], 90}, - - {IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[3], 100}, - - {IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[3], 120}, - - {IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[3], 135}, + OP_CAMMENU(3) }; static const char* OP_PlayerCamOptionsTooltips[] = -- 2.54.0 From 03c624a77bf68ee908c115c450753c9fab13381b Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 15 May 2025 21:40:48 +0200 Subject: [PATCH 11/20] make addon warning not print "(null)" if there is no refreshdirname kinda lazy way but shrug --- src/m_menu.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 4e951261a..8f74dc018 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6239,25 +6239,41 @@ static boolean M_AddonsRefresh(void) { S_StartSound(NULL, sfx_s26d); if (refreshdirmenu & REFRESHDIR_MAX) - message = va("%c%s\x80\nMaximum number of addons reached.\nA file could not be loaded.\nIf you wish to play with this addon, restart the game to clear existing ones.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + { + if (refreshdirname) + message = va("%c%s\x80\nMaximum number of addons reached.\nA file could not be loaded.\nIf you wish to play with this addon, restart the game to clear existing ones.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + else + message = va("%c\x80 Maximum number of addons reached.\nA file could not be loaded.\nIf you wish to play with this addon, restart the game to clear existing ones.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT))); + } else - message = va("%c%s\x80\nA file was not loaded.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + { + if (refreshdirname) + message = va("%c%s\x80\nA file was not loaded.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + else + message = va("%c\x80 A file was not loaded.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT))); + } } else if (refreshdirmenu & (REFRESHDIR_WARNING | REFRESHDIR_ERROR)) { S_StartSound(NULL, sfx_s224); - message = va("%c%s\x80\nA file was loaded with %s.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname, ((refreshdirmenu & REFRESHDIR_ERROR) ? "errors" : "warnings")); + if (refreshdirname) + message = va("%c%s\x80\nA file was loaded with %s.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname, ((refreshdirmenu & REFRESHDIR_ERROR) ? "errors" : "warnings")); + else + message = va("%c\x80 A file was loaded with %s.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), ((refreshdirmenu & REFRESHDIR_ERROR) ? "errors" : "warnings")); } else if (majormods && !prevmajormods) { S_StartSound(NULL, sfx_s221); - message = va("%c%s\x80\nYou've loaded a gameplay-modifying addon.\n\nRecord Attack data will be saved to a seperate save file.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + if (refreshdirname) + message = va("%c%s\x80\nYou've loaded a gameplay-modifying addon.\n\nRecord Attack data will be saved to a seperate save file.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname); + else + message = va("%c\x80 You've loaded a gameplay-modifying addon.\n\nRecord Attack data will be saved to a seperate save file.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT))); prevmajormods = majormods; } if (message) { - M_StartMessage(message,M_AddonsClearName,MM_EVENTHANDLER); + M_StartMessage(message, M_AddonsClearName, MM_EVENTHANDLER); return true; } -- 2.54.0 From 224e3b25e5127c9a563c7d75d34250783d36c3c1 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 16 May 2025 01:30:28 +0200 Subject: [PATCH 12/20] Revert "those appear to do nothing" This reverts commit 5f40ff5a0349fa97c9cc25dc10d89c4155935460. --- src/hardware/hw_main.c | 5 +++++ src/r_bsp.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 1828b5f60..af2074977 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2315,6 +2315,9 @@ static void HWR_AddLine(seg_t *line) { angle_t angle1, angle2; + // SoM: Backsector needs to be run through R_FakeFlat + static sector_t tempsec; + fixed_t v1x, v1y, v2x, v2y; // the seg's vertexes as fixed_t boolean dont_draw = false; @@ -2371,6 +2374,8 @@ doaddline: } else { + gl_backsector = R_FakeFlat(gl_backsector, &tempsec, NULL, NULL, true); + if (CheckClip(gl_frontsector, gl_backsector)) { gld_clipper_SafeAddClipRange(angle2, angle1); diff --git a/src/r_bsp.c b/src/r_bsp.c index bc8c124ee..427a6367c 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -388,6 +388,7 @@ static void R_AddLine(seg_t *line) { INT32 x1, x2; angle_t angle1, angle2, span, tspan; + static sector_t tempsec; g_portal = NULL; @@ -471,6 +472,8 @@ static void R_AddLine(seg_t *line) if (!backsector) goto clipsolid; + backsector = R_FakeFlat(backsector, &tempsec, NULL, NULL, true); + doorclosed = 0; fixed_t frontf1,frontf2, frontc1, frontc2; // front floor/ceiling ends -- 2.54.0 From 03264e760ffeab86ccb8d59b3773f473af74db25 Mon Sep 17 00:00:00 2001 From: Indev Date: Fri, 16 May 2025 13:36:05 +0300 Subject: [PATCH 13/20] Allow music credit to be drawn in intermission and main menu --- src/d_main.c | 1 + src/g_game.c | 1 + src/hu_stuff.c | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index fd92739b9..4f76b6858 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -472,6 +472,7 @@ static boolean D_Display(void) F_TitleScreenDrawer(); if (wipe) wipedefindex = wipe_titlescreen_toblack; + HU_Drawer(); break; case GS_WAITINGPLAYERS: diff --git a/src/g_game.c b/src/g_game.c index 17feba6e3..36f723b93 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1954,6 +1954,7 @@ void G_Ticker(boolean run) case GS_TITLESCREEN: F_TitleScreenTicker(run); + HU_Ticker(); break; case GS_WAITINGPLAYERS: if (netgame) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 339722661..0ad7fcb82 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2203,9 +2203,14 @@ void HU_Drawer(void) if (cechotimer) HU_DrawCEcho(); + // draw song credits + if (cv_songcredits.value) + HU_DrawSongCredits(); + if (!( Playing() || demo.playback ) || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS || gamestate == GS_EVALUATION + || gamestate == GS_TITLESCREEN || gamestate == GS_GAMEEND || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS) // SRB2kart return; @@ -2236,10 +2241,6 @@ void HU_Drawer(void) if (gamestate != GS_LEVEL) return; - // draw song credits - if (cv_songcredits.value) - HU_DrawSongCredits(); - // draw desynch text if (hu_resynching #ifdef SATURNPAK -- 2.54.0 From db4d9a330a58542aff376f653a8bb4d399f06ba7 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 16 May 2025 14:15:19 +0200 Subject: [PATCH 14/20] even more tiny cleanup votebg stuff --- src/v_video.c | 9 +++------ src/y_inter.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index 9ce67dde6..0f3306696 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1565,10 +1565,8 @@ void V_DrawPatchFill(patch_t *pat) // Draws a patch and tries to always fill the screen with the patch void V_DrawAdaptiveScaledFullScreenPatch(patch_t *patch) { - fixed_t x = 0, y = 0, scale = FRACUNIT; - - scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally - + fixed_t x = 0, y = 0; + fixed_t scale = ((vid.width * FRACUNIT) / patch->width); // fit the screen horizontally fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); // however, if this means the patch doesent fill out the screen vertically then @@ -1588,6 +1586,7 @@ void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch) { fixed_t scale = ((vid.height * FRACUNIT) / patch->height); fixed_t x = ((vid.width << FRACBITS) - FixedMul(patch->width << FRACBITS, scale)) / 2; // i fucking hate maths + V_DrawFixedPatch(x, 0, scale, V_NOSCALEPATCH, patch, NULL); } @@ -1596,9 +1595,7 @@ void V_DrawVerticallyScaledFullScreenPatch(patch_t *patch) void V_DrawHorizontallyScaledFullScreenPatch(patch_t *patch) { fixed_t scale = ((vid.width * FRACUNIT) / patch->width); - fixed_t scaled_height = FixedMul(patch->height << FRACBITS, scale); - fixed_t y = (vid.height << FRACBITS) - scaled_height; // center it if it does not fit the screen vertically diff --git a/src/y_inter.c b/src/y_inter.c index 48edf3a9e..4ace2a562 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -934,21 +934,25 @@ static void Y_DrawVoteBackground(patch_t *patch) // static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch) { + INT32 nextframe = 0; patch_t *votebg = NULL; char tempAnimPrefix[7]; + const INT32 tempFoundAnimVoteFrames = ((widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1); + strcpy(tempAnimPrefix, (widePatch ? animWidePrefix : animPrefix)); - const INT32 tempFoundAnimVoteFrames = (widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1; // Just in case someone provides LESS widescreen frames than normal frames or vice versa, reset the frame counter to 0 if (currentAnimFrame > tempFoundAnimVoteFrames) currentAnimFrame = 0; - votebg = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_PATCH); + nextframe = (currentAnimFrame + 1); + + votebg = W_CachePatchName(va("%s%d", (widePatch ? animWidePrefix : animPrefix), nextframe), PU_PATCH); Y_DrawVoteBackground(votebg); if (renderisnewtic && (votetic % 2 == 0) && !paused) - currentAnimFrame = (currentAnimFrame + 1 > tempFoundAnimVoteFrames) ? 0 : (currentAnimFrame + 1); + currentAnimFrame = (nextframe > tempFoundAnimVoteFrames) ? 0 : nextframe; } static void Y_DrawVoteScreenPatch(void) @@ -1027,6 +1031,7 @@ void Y_VoteDrawer(void) } y = (200-height)/2; + for (i = 0; i < 4; i++) { const char *str; -- 2.54.0 From 5899a0c4536f7f983f5624160cfb82740f636f3d Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 16 May 2025 14:22:03 +0200 Subject: [PATCH 15/20] ok even more cleanup for animvote check --- src/y_inter.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 4ace2a562..3c0a77ac1 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -294,27 +294,23 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) static void Y_AnimatedVoteScreenCheck(void) { char tmpPrefix[] = "INTS"; - boolean stopSearching = false; if (luaVoteScreen) strncpy(tmpPrefix, luaVoteScreen, 4); - else - { - if (G_BattleGametype()) - strcpy(tmpPrefix, "BTLS"); - } + else if (G_BattleGametype()) + strcpy(tmpPrefix, "BTLS"); strncpy(animPrefix, tmpPrefix, 4); animPrefix[4] = 'C'; strncpy(animWidePrefix, tmpPrefix, 4); animWidePrefix[4] = 'W'; - foundAnimVoteFrames = 0; - foundAnimVoteWideFrames = 0; + foundAnimVoteFrames = foundAnimVoteWideFrames = 0; currentAnimFrame = 0; INT32 i = 1; - while (!stopSearching) + + for (;;) { boolean normalLumpExists = W_LumpExists(va("%sC%d", tmpPrefix, i)); boolean wideLumpExists = W_LumpExists(va("%sW%d", tmpPrefix, i)); @@ -328,7 +324,7 @@ static void Y_AnimatedVoteScreenCheck(void) foundAnimVoteWideFrames++; } else // If we don't find at least frame 1 (e.g VEXTRN1), let's just stop looking - stopSearching = true; + break; i++; } -- 2.54.0 From ff6358b03158a00730b118a961d089833c83b484 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 17 May 2025 03:46:41 +0200 Subject: [PATCH 16/20] make ogl screenflip stuff directly assignable those dont need to be seperate bools lel also simplify the assignment aswell --- src/hardware/hw_defs.h | 12 +++++++++--- src/hardware/hw_main.c | 26 ++++++++++++-------------- src/hardware/hw_md2.c | 3 +-- src/hardware/r_opengl/r_opengl.c | 28 +++++++++++++++++----------- 4 files changed, 39 insertions(+), 30 deletions(-) diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index 822389758..08cce42c9 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -131,17 +131,23 @@ typedef struct FLOAT scalex, scaley, scalez; FLOAT fovangle; UINT8 splitscreen; - boolean flip; // screenflip boolean roll; FLOAT rollangle; FLOAT centerx, centery; FLOAT rollx, rollz; - boolean mirror; // SRB2Kart: Encore Mode - boolean mirrorflip; // Encore Mode with Flipcam + UINT8 fliptype; boolean shearing; // 14042019 float viewaiming; // 17052019 } FTransform; +enum +{ + TRANSFORM_NONE = 0, + TRANSFORM_FLIP = 1 << 0, // screenflip + TRANSFORM_MIRROR = 1 << 1, // SRB2Kart: Encore Mode + TRANSFORM_MIRRORFLIP = TRANSFORM_FLIP|TRANSFORM_MIRROR // SRB2Kart: Encore Mode with Flipcam +}; + // Transformed vector, as passed to HWR API typedef struct { diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index af2074977..6095ea38b 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4672,7 +4672,7 @@ static void HWR_ProjectSprite(mobj_t *thing) const boolean vflip = (thing->eflags & MFE_VERTICALFLIP); const boolean hflip = (!(thing->frame & FF_HORIZONTALFLIP) != !mirrored); - this_scale = FixedToFloat(interp.scale); + this_scale = FixedToFloat(interp.scale); spritexscale = FixedToFloat(interp.spritexscale); spriteyscale = FixedToFloat(interp.spriteyscale); @@ -5342,9 +5342,6 @@ static void HWR_SetTransformAiming(FTransform *trans) void HWR_SetTransform(float fpov) { - UINT8 viewnum = R_GetViewNumber(); - camera_t *thiscam = &camera[viewnum]; - gl_viewx = FixedToFloat(viewx); gl_viewy = FixedToFloat(viewy); gl_viewz = FixedToFloat(viewz); @@ -5372,17 +5369,17 @@ void HWR_SetTransform(float fpov) HWR_RollTransform(&atransform, viewroll); atransform.splitscreen = splitscreen; - atransform.flip = false; - if ((thiscam->postimg & POSTIMG_FLIP) && !(thiscam->postimg & POSTIMG_MIRROR)) - atransform.flip = true; + const UINT8 postimg = camera[R_GetViewNumber()].postimg; - atransform.mirror = false; - if ((thiscam->postimg & POSTIMG_MIRROR) && !(thiscam->postimg & POSTIMG_FLIP)) - atransform.mirror = true; - - atransform.mirrorflip = false; - if ((thiscam->postimg & POSTIMG_FLIP) && (thiscam->postimg & POSTIMG_MIRROR)) - atransform.mirrorflip = true; + if (postimg & POSTIMG_FLIP) + { + if (postimg & POSTIMG_MIRROR) + atransform.fliptype = TRANSFORM_MIRRORFLIP; + else + atransform.fliptype = TRANSFORM_FLIP; + } + else if (postimg & POSTIMG_MIRROR) + atransform.fliptype = TRANSFORM_MIRROR; // Set transform. GL_SetTransform(&atransform); @@ -5650,6 +5647,7 @@ void HWR_RenderPlayerView(void) { if (cv_ripplewater.value) GL_SetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime. + const angle_t light_angle = maplighting.angle - viewangle + ANGLE_90; // I fucking hate OGL's coordinate system GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT)); GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0); diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 0de904716..ae6496e96 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1468,8 +1468,7 @@ void HWR_DrawMD2(gl_vissprite_t *spr) p.anglex += flipfactor*FIXED_TO_FLOAT(AngleFixed(interp.roll)); p.anglez -= flipfactor*FIXED_TO_FLOAT(AngleFixed(interp.pitch)); - p.flip = atransform.flip; - p.mirror = atransform.mirror; // from Kart + p.fliptype = atransform.fliptype; GL_SetShader(SHADER_MODEL); // model shader { diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index fb1eb2f80..12ec0cd97 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2730,8 +2730,7 @@ void GL_DrawModelEx(model_t *model, INT32 frameIndex, float duration, float tics // pos->mirror is if the screen is flipped horizontally // XOR all the flips together to figure out what culling to use! { - boolean reversecull = (flipped ^ hflipped ^ pos->flip ^ pos->mirror); - if (reversecull) + if ((flipped ^ hflipped ^ !!(pos->fliptype & TRANSFORM_FLIP) ^ !!(pos->fliptype & TRANSFORM_MIRROR))) pglCullFace(GL_FRONT); else pglCullFace(GL_BACK); @@ -2877,14 +2876,21 @@ void GL_SetTransform(FTransform *stransform) used_fov = stransform->fovangle; shearing = stransform->shearing; - if (stransform->mirror) - pglScalef(-stransform->scalex, stransform->scaley, -stransform->scalez); - else if (stransform->mirrorflip) - pglScalef(-stransform->scalex, -stransform->scaley, -stransform->scalez); - else if (stransform->flip) - pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez); - else - pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez); + switch (stransform->fliptype) + { + case TRANSFORM_MIRROR: + pglScalef(-stransform->scalex, stransform->scaley, -stransform->scalez); + break; + case TRANSFORM_MIRRORFLIP: + pglScalef(-stransform->scalex, -stransform->scaley, -stransform->scalez); + break; + case TRANSFORM_FLIP: + pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez); + break; + default: // TRANSFORM_NONE + pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez); + break; + } if (stransform->roll) pglRotatef(stransform->rollangle, 0.0f, 0.0f, 1.0f); @@ -2910,7 +2916,7 @@ void GL_SetTransform(FTransform *stransform) if (shearing) { float dy = stransform->viewaiming * 2; - if (stransform->flip || stransform->mirrorflip) + if (stransform->fliptype == TRANSFORM_FLIP || stransform->fliptype == TRANSFORM_MIRRORFLIP) dy *= -1.0f; pglTranslatef(0.0f, -dy/BASEVIDHEIGHT, 0.0f); } -- 2.54.0 From b190f09aead3e66ade669d89d9e44d122e762dfd Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 17 May 2025 03:47:01 +0200 Subject: [PATCH 17/20] fix 3d models rollangle on gravflip idk if this is correct, but it works lel --- src/hardware/hw_md2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index ae6496e96..2696cf89d 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1431,6 +1431,8 @@ void HWR_DrawMD2(gl_vissprite_t *spr) ? (spr->mobj->rollangle) + (sliptideroll * spr->mobj->player->kartstuff[k_aizdriftstrat]) : (spr->mobj->rollangle); + rollang *= flipfactor; + fixed_t anglef = AngleFixed(rollang); p.rollangle = 0.0f; -- 2.54.0 From 723286826b09e73f24d5b94b368c6d522e82f496 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 17 May 2025 03:47:14 +0200 Subject: [PATCH 18/20] make this switch slighty prettier --- src/hardware/hw_main.c | 51 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 6095ea38b..88a2e9a1e 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4371,44 +4371,45 @@ static void HWR_RenderDrawNodes(void) switch (drawnode->type) { case DRAWNODE_PLANE: - { - planeinfo_t *plane = &drawnode->u.plane; + { + planeinfo_t *plane = &drawnode->u.plane; - // We aren't traversing the BSP tree, so make gl_frontsector null to avoid crashes. - gl_frontsector = NULL; + // We aren't traversing the BSP tree, so make gl_frontsector null to avoid crashes. + gl_frontsector = NULL; - if (!(plane->blend & PF_NoTexture)) - HWR_GetFlat(plane->lumpnum, R_NoEncore(plane->FOFSector, plane->isceiling)); + if (!(plane->blend & PF_NoTexture)) + HWR_GetFlat(plane->lumpnum, R_NoEncore(plane->FOFSector, plane->isceiling)); - HWR_RenderPlane(NULL, plane->xsub, plane->isceiling, plane->fixedheight, plane->blend, plane->lightlevel, - plane->lumpnum, plane->FOFSector, plane->alpha, plane->planecolormap); + HWR_RenderPlane(NULL, plane->xsub, plane->isceiling, plane->fixedheight, plane->blend, plane->lightlevel, + plane->lumpnum, plane->FOFSector, plane->alpha, plane->planecolormap); + } break; - } case DRAWNODE_POLYOBJECT_PLANE: - { - polyplaneinfo_t *polyplane = &drawnode->u.polyplane; + { + polyplaneinfo_t *polyplane = &drawnode->u.polyplane; - // We aren't traversing the BSP tree, so make gl_frontsector null to avoid crashes. - gl_frontsector = NULL; + // We aren't traversing the BSP tree, so make gl_frontsector null to avoid crashes. + gl_frontsector = NULL; - if (!(polyplane->blend & PF_NoTexture)) - HWR_GetFlat(polyplane->lumpnum, R_NoEncore(polyplane->FOFSector, polyplane->isceiling)); + if (!(polyplane->blend & PF_NoTexture)) + HWR_GetFlat(polyplane->lumpnum, R_NoEncore(polyplane->FOFSector, polyplane->isceiling)); - HWR_RenderPolyObjectPlane(polyplane->polysector, polyplane->isceiling, polyplane->fixedheight, polyplane->blend, polyplane->lightlevel, - polyplane->lumpnum, polyplane->FOFSector, polyplane->alpha, polyplane->planecolormap); + HWR_RenderPolyObjectPlane(polyplane->polysector, polyplane->isceiling, polyplane->fixedheight, polyplane->blend, polyplane->lightlevel, + polyplane->lumpnum, polyplane->FOFSector, polyplane->alpha, polyplane->planecolormap); + + } break; - } case DRAWNODE_WALL: - { - wallinfo_t *wall = &drawnode->u.wall; + { + wallinfo_t *wall = &drawnode->u.wall; - if (!(wall->blend & PF_NoTexture)) - HWR_GetTexture(wall->texnum, wall->noencore); + if (!(wall->blend & PF_NoTexture)) + HWR_GetTexture(wall->texnum, wall->noencore); - HWR_RenderWall(wall->wallVerts, &wall->Surf, wall->blend, wall->fogwall, - wall->lightlevel, wall->wallcolormap); + HWR_RenderWall(wall->wallVerts, &wall->Surf, wall->blend, wall->fogwall, + wall->lightlevel, wall->wallcolormap); + } break; - } default: break; } -- 2.54.0 From fcdccb96aa5ac0131d50b9fcac08d1c169790fd7 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 17 May 2025 14:52:59 +0200 Subject: [PATCH 19/20] move camera to spawn if you press freecam toggle when spectating since we dont use the toggle in spectatormode might be useful to return to the mapstart fast or smth this is mostly just copy pasted from P_ResetCamera, which should be fine hopefully since we dont move our spectators anymore --- src/p_user.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 5d69dc381..1cd747927 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1282,9 +1282,6 @@ void P_DoPlayerExit(player_t *player) if (player == &players[consoleplayer]) demo.savebutton = leveltime; - - /*if (playeringame[player-players] && netgame && !circuitmap) - CONS_Printf(M_GetText("%s has completed the level.\n"), player_names[player-players]);*/ } #define SPACESPECIAL 12 @@ -2285,7 +2282,9 @@ static void P_MovePlayer(player_t *player) { player->lturn_max[leveltime%MAXPREDICTTICS] = K_GetKartTurnValue(player, KART_FULLTURN)+1; player->rturn_max[leveltime%MAXPREDICTTICS] = K_GetKartTurnValue(player, -KART_FULLTURN)-1; - } else { + } + else + { player->lturn_max[leveltime%MAXPREDICTTICS] = player->rturn_max[leveltime%MAXPREDICTTICS] = 0; } @@ -3746,6 +3745,33 @@ static boolean P_CheckNoclipCameraPosition(player_t *player, camera_t *thiscam, } #endif +static void P_MoveCameraToSpawn(UINT8 playernum) +{ + camera_t *thiscam = &camera[playernum]; + player_t *player = playernum == 0 ? &players[consoleplayer] : &players[displayplayers[playernum]]; + + if (!thiscam || !player->mo) + return; + + thiscam->x = player->mo->x - P_ReturnThrustX(player->mo, thiscam->angle, player->mo->radius); + thiscam->y = player->mo->y - P_ReturnThrustY(player->mo, thiscam->angle, player->mo->radius); + if (player->mo->eflags & MFE_VERTICALFLIP) + thiscam->z = player->mo->z + player->mo->height - (32<z = player->mo->z + (32<reset = true; + + thiscam->angle = player->mo->angle; + thiscam->aiming = 0; + + thiscam->subsector = R_PointInSubsector(thiscam->x,thiscam->y); + + thiscam->reset_aiming = true; + + R_ResetViewInterpolation(playernum); +} + boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcalled) { static boolean lookbackactive[MAXSPLITSCREENPLAYERS]; @@ -3779,6 +3805,13 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (thiscam->freecam || player->spectator) { + // idk if this is the best place? + if (player->spectator && InputDown(gc_freecam, num+1)) + { + P_MoveCameraToSpawn(num); + return true; // dont move while you hold this + } + P_DemoCameraMovement(thiscam, num); P_CalcChasePostImg(player, thiscam); return true; -- 2.54.0 From ed05a909cb9f38025a6790ab3ffd99650a0d9185 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 19 May 2025 15:56:56 +0200 Subject: [PATCH 20/20] add vote scaling to menu --- src/m_menu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index b8198b650..75a905ce6 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1555,15 +1555,17 @@ static menuitem_t OP_ExpOptionsMenu[] = {IT_STRING | IT_CVAR, NULL, "FPS counter sampling", &cv_accuratefps, 50}, + {IT_STRING | IT_CVAR, NULL, "Votescreen Scaling", &cv_votebgscaling, 60}, + #ifdef HWRENDER - {IT_STRING | IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 60}, + {IT_STRING | IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 70}, #ifdef USE_FBO_OGL - {IT_STRING | IT_CVAR, NULL, "FBO Downsampling support", &cv_glframebuffer, 65}, - {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 75}, - {IT_DISABLED, NULL, "", NULL, 85}, // dummy text + {IT_STRING | IT_CVAR, NULL, "FBO Downsampling support", &cv_glframebuffer, 75}, + {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 85}, + {IT_DISABLED, NULL, "", NULL, 95}, // dummy text #else - {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 70}, - {IT_DISABLED, NULL, "", NULL, 80}, // dummy text + {IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 80}, + {IT_DISABLED, NULL, "", NULL, 90}, // dummy text #endif #endif }; @@ -1578,6 +1580,7 @@ static const char* OP_ExpTooltips[] = //"Should the directional lightning be randomized each map?\nTakes effect on next map load.", "Toggle being able to see the sky.", "Change the FPS counter sampling method\nInaccurate updates slower and might miss frame drops and such\nAccurate updates faster and is more accurate, but might be less readable", // how to ingles?? + "Different methods of scaling the votescreen backgrounds.", #ifdef HWRENDER "Should the game do Screen Textures? Provides a good boost to frames\nat the cost of some visual effects not working when disabled.", #ifdef USE_FBO_OGL -- 2.54.0