Add 'StickGFX' option for showinput cvar if graphics for it exist

This commit is contained in:
indev committed 2025-03-27 23:19:27 +03:00
1 parent 806d8b5e42
commit 526b254345
3 files changed
+10 -2

No files matched your search

+5
View File
@@ -1639,8 +1639,11 @@ void D_SRB2Main(void)
// Possible value that changes depending on whether required files for speedometer are found or not
CV_PossibleValue_t speedo_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
CV_PossibleValue_t driftgaugestyle_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {2, "Small"}, {3, "Big Numbers"}, {4, "Numbers Only"}, {0, NULL}, {0, NULL}}; // ugh i dont want this but bleh
CV_PossibleValue_t inputdisplay_cons_temp[NUMINPUTDISPLAYSTUFF] = {{0, "Off"}, {1, "Wheel"}, {2, "Stick"}, {0, NULL}, {0, NULL}};
unsigned last_speedo_i = 0;
unsigned last_driftgauge_i = 0;
unsigned last_inputdisplay_i = 2;
#define PUSHCONS(cons, i, id, name) { ++i; cons[i].value = id; cons[i].strvalue = name; }
if (found_extra_kart || found_extra2_kart || found_extra3_kart) // found the funny, add it in!
@@ -1708,6 +1711,7 @@ void D_SRB2Main(void)
if (W_CheckMultipleLumps("K_DGAU","K_DCAU","K_DGSU","K_DCSU", NULL))
{
driftgaugegfx = true;
PUSHCONS(inputdisplay_cons_temp, last_inputdisplay_i, 3, "StickGFX");
}
if (W_CheckMultipleLumps("JOYBCK","JOYKNB","JOYSHD", NULL))
@@ -1737,6 +1741,7 @@ void D_SRB2Main(void)
#undef PUSHCONS
memcpy(speedo_cons_t, speedo_cons_temp, sizeof(speedo_cons_t));
memcpy(driftgaugestyle_cons_t, driftgaugestyle_cons_temp, sizeof(driftgaugestyle_cons_t));
memcpy(inputdisplay_cons_t, inputdisplay_cons_temp, sizeof(inputdisplay_cons_t));
// Do it before P_InitMapData because PNG patch
// conversion sometimes needs the palette
+2 -2
View File
@@ -133,7 +133,7 @@ consvar_t cv_airsparks = {"airdriftsparks", "Off", CV_SAVE, CV_OnOff, NULL, 0, N
//extra hud things
consvar_t cv_showstats = {"showstats", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t inputdisplay_cons_t[] = {{0, "Off"}, {1, "Wheel"}, {2, "Stick"}, {0, NULL}};
CV_PossibleValue_t inputdisplay_cons_t[NUMINPUTDISPLAYSTUFF];
consvar_t cv_showinput = {"showinput", "Off", CV_SAVE, inputdisplay_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_showlaptimes = {"showlaptimes", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -11091,7 +11091,7 @@ static void K_drawInput(void)
y -= FRACUNIT;
if (cv_showinput.value == 2)
if (cv_showinput.value == 3)
{
INT32 joyx, joyxoffs, joyy, joyyoffs, axis;
joyxoffs = -8, joyyoffs = -24;
+3
View File
@@ -45,6 +45,9 @@ extern consvar_t cv_huditemamount;
extern CV_PossibleValue_t speedo_cons_t[NUMSPEEDOSTUFF];
extern CV_PossibleValue_t driftgaugestyle_cons_t[NUMSPEEDOSTUFF];
#define NUMINPUTDISPLAYSTUFF 5
extern CV_PossibleValue_t inputdisplay_cons_t[NUMINPUTDISPLAYSTUFF];
boolean K_IsPlayerLosing(player_t *player);
boolean K_IsPlayerWanted(player_t *player);
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);