From eed42d9b18e733e544fcb4d53ff0b5daaf488665 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 8 Jan 2025 04:00:57 +0100 Subject: [PATCH] toggle for smol positionnum and posnum animation --- src/g_game.h | 2 ++ src/k_kart.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/g_game.h b/src/g_game.h index ac08d9809..3fb75ee6d 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -164,6 +164,8 @@ DECL_HUD_OFFSET(stat); // Stats #undef DECL_HUD_OFFSET_Y extern consvar_t cv_showinput; +extern consvar_t cv_posanim; +extern consvar_t cv_smallposnum; extern consvar_t cv_newspeedometer; extern consvar_t cv_saltyhop; diff --git a/src/k_kart.c b/src/k_kart.c index dd90eb6ef..86372e931 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -121,6 +121,10 @@ consvar_t cv_showstats = {"showstats", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, consvar_t cv_showinput = {"showinput", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_showlaptimes = {"showlaptimes", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_posanim = {"postitionanimation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_smallposnum = {"smallpositionnumber", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; + + CV_PossibleValue_t speedo_cons_t[NUMSPEEDOSTUFF]; consvar_t cv_newspeedometer = {"newspeedometer", "Default", CV_SAVE, speedo_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -769,6 +773,10 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_showstats); CV_RegisterVar(&cv_showinput); + + CV_RegisterVar(&cv_posanim); + CV_RegisterVar(&cv_smallposnum); + CV_RegisterVar(&cv_showlaptimes); CV_RegisterVar(&cv_newspeedometer); @@ -8650,13 +8658,13 @@ static void K_DrawKartPositionNum(INT32 num) boolean flipvdraw = false; // used only for 2p splitscreen so overtaking doesn't make 1P's position fly off the screen. boolean overtake = false; - if (stplyr->kartstuff[k_positiondelay] || stplyr->exiting) + if ((cv_posanim.value && stplyr->kartstuff[k_positiondelay]) || stplyr->exiting) { scale *= 2; overtake = true; // this is used for splitscreen stuff in conjunction with flipdraw. } - if (splitscreen || (cv_showinput.value && !splitscreen)) + if (splitscreen || cv_smallposnum.value || cv_showinput.value) scale /= 2; W = FixedMul(W<>FRACBITS;