diff --git a/src/d_main.c b/src/d_main.c index 500a3a22f..d20b07afd 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1268,6 +1268,7 @@ boolean xtra_speedo_clr3 = false; // 80x 11 extra speedometer colour check boolean achi_speedo = false; // achiiro speedometer check boolean achi_speedo_clr = false; // extra speedometer colour check boolean kartz_speedo = false; // kartZ speedo +boolean kartz_speedo_smol = false; // kartZ speedo but smol boolean clr_hud = false; // colour hud check boolean driftgaugegfx_clr = false; // driftgauge colour check @@ -1395,8 +1396,8 @@ static inline void D_MakeTitleString(char *s) static void D_CheckSaturnExtraFiles(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}}; + CV_PossibleValue_t speedo_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}}; + CV_PossibleValue_t driftgaugestyle_cons_temp[NUMDGAUGESTUFF] = {{1, "Default"}, {2, "Small"}, {3, "Big Numbers"}, {4, "Numbers Only"}, {0, NULL}, {0, NULL}}; CV_PossibleValue_t inputdisplay_cons_temp[NUMINPUTDISPLAYSTUFF] = {{0, "Off"}, {1, "Wheel"}, {2, "Stick"}, {0, NULL}, {0, NULL}}; unsigned last_speedo_i = 0; @@ -1439,6 +1440,15 @@ static void D_CheckSaturnExtraFiles(void) PUSHCONS(speedo_cons_temp, last_speedo_i, 4, "P-Meter"); } + if (W_CheckMultipleLumps("K_KZSS1", "K_KZSS2", "K_KZSS3", "K_KZSS4", "K_KZSS5", + "K_KZSS6", "K_KZSS7", "K_KZSS8", "K_KZSS9", "K_KZSS10", "K_KZSS11", "K_KZSS12", + "K_KZSS13", "K_KZSS14", "K_KZSS15", "K_KZSS16", "K_KZSS17", "K_KZSS18", "K_KZSS19", + "K_KZSS20", "K_KZSS21", "K_KZSS22", "K_KZSS23", "K_KZSS24", "K_KZSS25", NULL)) + { + kartz_speedo_smol = true; + PUSHCONS(speedo_cons_temp, last_speedo_i, 5, "P-Meter Small"); + } + // stat display for extended player setup if (W_CheckMultipleLumps("K_STATNB", "K_STATN1", "K_STATN2", "K_STATN3", "K_STATN4", "K_STATN5", "K_STATN6", NULL)) @@ -1519,7 +1529,7 @@ static void D_CheckSaturnExtraFiles(void) if (W_LumpExists("SP_SM3TC")) { xtra_speedo3 = true; - PUSHCONS(speedo_cons_temp, last_speedo_i, 5, "Extra"); + PUSHCONS(speedo_cons_temp, last_speedo_i, 6, "Extra"); PUSHCONS(driftgaugestyle_cons_temp, last_driftgauge_i, 5, "Extra"); } diff --git a/src/d_main.h b/src/d_main.h index 2c3b6cf54..84c19e6e5 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -39,6 +39,7 @@ extern boolean xtra_speedo_clr3; // 80x11 extra speedometer colour check extern boolean achi_speedo; // achiiro speedometer check extern boolean achi_speedo_clr; // extra speedometer colour check extern boolean kartz_speedo; // kartZ speedo +extern boolean kartz_speedo_smol; // kartZ speedo but smol extern boolean clr_hud; // colour hud check extern boolean driftgaugegfx_clr; // driftgauge colour check diff --git a/src/k_kart.c b/src/k_kart.c index 4989b2e69..f9d42b5ae 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -250,7 +250,7 @@ consvar_t cv_colorizedhudcolor = {"colorizedhudcolor", "Skin Color", CV_SAVE, Hu // driftgauge stuffs static CV_PossibleValue_t driftgaugeoffset_cons_t[] = { {-FRACUNIT*128, "MIN"}, {FRACUNIT*128, "MAX"}, {0, NULL}}; -CV_PossibleValue_t driftgaugestyle_cons_t[NUMSPEEDOSTUFF]; +CV_PossibleValue_t driftgaugestyle_cons_t[NUMDGAUGESTUFF]; consvar_t cv_driftgauge = {"kartdriftgauge", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_driftgaugeofs = {"kartdriftgaugeoffset", "-20", CV_FLOAT|CV_SAVE, driftgaugeoffset_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -7733,6 +7733,7 @@ static patch_t *kp_itembgclr[4]; //Kartz speedo static patch_t *kp_kartzspeedo[25]; +static patch_t *kp_kartzspeedo_smol[25]; static patch_t *kp_startcountdown[16]; static patch_t *kp_racefinish[6]; @@ -7907,7 +7908,7 @@ void K_LoadKartHUDGraphics(void) if (achi_speedo && achi_speedo_clr) { - skp_smallstickerachiclr = W_CachePatchName("SC_AMSTC", PU_HUDGFX); + skp_smallstickerachiclr = W_CachePatchName("SC_AMSTC", PU_HUDGFX); skp_speedpatchesachiclr[0] = W_CachePatchName("K_TRNULL", PU_HUDGFX); // lolxd skp_speedpatchesachiclr[1] = W_CachePatchName("SC_AKMH", PU_HUDGFX); skp_speedpatchesachiclr[2] = W_CachePatchName("SC_AMPH", PU_HUDGFX); @@ -7932,6 +7933,22 @@ void K_LoadKartHUDGraphics(void) } } + if (kartz_speedo_smol) + { + const char* patchNames[] = { + "K_KZSS1", "K_KZSS2", "K_KZSS3", "K_KZSS4", "K_KZSS5", + "K_KZSS6", "K_KZSS7", "K_KZSS8", "K_KZSS9", "K_KZSS10", + "K_KZSS11", "K_KZSS12", "K_KZSS13", "K_KZSS14", "K_KZSS15", + "K_KZSS16", "K_KZSS17", "K_KZSS18", "K_KZSS19", "K_KZSS20", + "K_KZSS21", "K_KZSS22", "K_KZSS23", "K_KZSS24", "K_KZSS25" + }; + + for (size_t m = 0; m < sizeof(patchNames) / sizeof(patchNames[0]); ++m) + { + kp_kartzspeedo_smol[m] = W_CachePatchName(patchNames[m], PU_HUDGFX); + } + } + // Nametags if (nametaggfx) { @@ -8548,7 +8565,7 @@ static void K_drawKartStats(void) //Internal offset for speedometer if (cv_kartspeedometer.value) { - if ((cv_newspeedometer.value == 2 && xtra_speedo) || (cv_newspeedometer.value == 3 && achi_speedo) || (cv_newspeedometer.value == 5 && xtra_speedo3)) + if ((cv_newspeedometer.value == 2 && xtra_speedo) || (cv_newspeedometer.value == 3 && achi_speedo) || (cv_newspeedometer.value == 6 && xtra_speedo3)) spdoffset = -10; else spdoffset = -14; @@ -9630,7 +9647,7 @@ static void K_drawKartSpeedometer(void) INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT); // man. - const boolean useoldspeedo = ((cv_newspeedometer.value == 1) || (cv_newspeedometer.value == 2 && !xtra_speedo) || (cv_newspeedometer.value == 3 && !achi_speedo) || (cv_newspeedometer.value == 4 && !kartz_speedo) || (cv_newspeedometer.value == 5 && !xtra_speedo3)); + const boolean useoldspeedo = ((cv_newspeedometer.value == 1) || (cv_newspeedometer.value == 2 && !xtra_speedo) || (cv_newspeedometer.value == 3 && !achi_speedo) || (cv_newspeedometer.value == 4 && !kartz_speedo) || (cv_newspeedometer.value == 5 && !kartz_speedo_smol) ||(cv_newspeedometer.value == 6 && !xtra_speedo3)); switch (cv_kartspeedometer.value) { @@ -9708,7 +9725,7 @@ static void K_drawKartSpeedometer(void) V_DrawScaledPatch(SPDM_X + 31, SPDM_Y + 4, V_HUDTRANS|splitflags, skp_speedpatchesachi[cv_kartspeedometer.value]); } } - else if (cv_newspeedometer.value == 5 && xtra_speedo3) // why bother if we dont? + else if (cv_newspeedometer.value == 6 && xtra_speedo3) // why bother if we dont? { if (K_UseColorHud() && xtra_speedo_clr3) //Colourized hud { @@ -9723,7 +9740,7 @@ static void K_drawKartSpeedometer(void) } // Kart Z speedo bullshit... // Draw the Speed counter. - else if (cv_newspeedometer.value == 4 && kartz_speedo) + else if ((cv_newspeedometer.value == 4 && kartz_speedo) || (cv_newspeedometer.value == 5 && kartz_speedo_smol)) { fixed_t fuspeed = 0; INT32 spdpatch = 0; @@ -9748,7 +9765,14 @@ static void K_drawKartSpeedometer(void) else if (((fuspeed < 57 && fuspeed > 54) || (fuspeed < 60 && fuspeed > 56) || (fuspeed > 59)) && !(leveltime & 4)) spdpatch = 23; - V_DrawScaledPatch(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, kp_kartzspeedo[spdpatch]); + patch_t *patch = NULL; + + if (cv_newspeedometer.value == 4 && kartz_speedo) + patch = kp_kartzspeedo[spdpatch]; + else if (cv_newspeedometer.value == 5 && kartz_speedo_smol) + patch = kp_kartzspeedo_smol[spdpatch]; + + V_DrawScaledPatch(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, patch); } } @@ -9768,7 +9792,7 @@ static void K_drawKartBumpersOrKarma(void) if (cv_battlespeedo.value && !splitscreen) { - if ((cv_newspeedometer.value == 2 && xtra_speedo) || (cv_newspeedometer.value == 3 && achi_speedo) || (cv_newspeedometer.value == 5 && xtra_speedo3)) + if ((cv_newspeedometer.value == 2 && xtra_speedo) || (cv_newspeedometer.value == 3 && achi_speedo) || (cv_newspeedometer.value == 6 && xtra_speedo3)) fy += 5; else fy += 7; diff --git a/src/k_kart.h b/src/k_kart.h index d9caa02aa..6ecd9583f 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -41,10 +41,10 @@ extern consvar_t cv_battlespeedo; extern consvar_t cv_multiitemicon; extern consvar_t cv_huditemamount; -#define NUMSPEEDOSTUFF 6 +#define NUMSPEEDOSTUFF 7 extern CV_PossibleValue_t speedo_cons_t[NUMSPEEDOSTUFF]; -extern CV_PossibleValue_t driftgaugestyle_cons_t[NUMSPEEDOSTUFF]; - +#define NUMDGAUGESTUFF 6 +extern CV_PossibleValue_t driftgaugestyle_cons_t[NUMDGAUGESTUFF]; #define NUMINPUTDISPLAYSTUFF 5 extern CV_PossibleValue_t inputdisplay_cons_t[NUMINPUTDISPLAYSTUFF];