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

This commit is contained in:
Alug committed 2025-03-27 21:43:14 +01:00
1 parent 3963943904
commit 1fb34eb71c
3 files changed
+10 -2

No files matched your search

+5
View File
@@ -1579,8 +1579,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!
@@ -1651,6 +1654,7 @@ void D_SRB2Main(void)
if (W_CheckMultipleLumps("JOYBCK","JOYKNB","JOYSHD", NULL))
{
joystickicon = true;
PUSHCONS(inputdisplay_cons_temp, last_inputdisplay_i, 3, "StickGFX");
}
// extra item icons
@@ -1675,6 +1679,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
@@ -91,7 +91,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};
@@ -10795,7 +10795,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
@@ -44,6 +44,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);