From 5ebdbce50b32b1b8cff103917f1c939e458b5b57 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Sat, 28 Jun 2025 20:02:00 -0400 Subject: [PATCH 1/3] 4P amps --- src/k_hud.cpp | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index a5e25edbf..367acc5d8 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -112,7 +112,7 @@ static patch_t *kp_ringspblock[16]; static patch_t *kp_ringspblocksmall[16]; static patch_t *kp_amps[7][12]; static patch_t *kp_amps_underlay[12]; -static patch_t *kp_overdrive[32]; +static patch_t *kp_overdrive[2][32]; static patch_t *kp_speedometersticker; static patch_t *kp_speedometerlabel[4]; @@ -519,7 +519,15 @@ void K_LoadKartHUDGraphics(void) { buffer[6] = '0'+((i) / 10); buffer[7] = '0'+((i) % 10); - HU_UpdatePatch(&kp_overdrive[i], "%s", buffer); + HU_UpdatePatch(&kp_overdrive[0][i], "%s", buffer); + } + + sprintf(buffer, "bsOVRDxx"); + for (i = 0; i < 32; i++) + { + buffer[6] = '0'+((i) / 10); + buffer[7] = '0'+((i) % 10); + HU_UpdatePatch(&kp_overdrive[1][i], "%s", buffer); } HU_UpdatePatch(&kp_ringdebtminus, "RDEBTMIN"); @@ -4188,7 +4196,34 @@ static void K_drawRingCounter(boolean gametypeinfoshown) else V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[0]->width) - 3) : 0), fy, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]); - V_DrawMappedPatch(fr+ringx, fy-3, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_smallring[ringanim_realframe], (colorring ? ringmap : NULL)); + + UINT8 ampx = 2; + UINT8 ampy = 1; + UINT8 odx = 11; + UINT8 ody = 9; + + V_DrawString(0, 0, splitflags, va("%d %d", fr, fy)); + + if (stplyr->overdrive) + { + V_DrawMappedPatch(fr-odx, fy-3-ody, V_HUDTRANS|V_SLIDEIN|splitflags, kp_overdrive[1][leveltime%32], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + } + else + { + V_DrawMappedPatch(fr+ringx, fy-3, V_HUDTRANS|V_SLIDEIN|splitflags|ringflip, kp_smallring[ringanim_realframe], (colorring ? ringmap : NULL)); + + if (stplyr->amps) + { + UINT8 amplevel = std::min(stplyr->amps / AMPLEVEL, 6); + + V_DrawSmallMappedPatch(fr-ampx, fy-3-ampy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps[amplevel][leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + if (amplevel == 6) + { + V_DrawSmallMappedPatch(fr-ampx, fy-3-ampy, V_ADD|V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps_underlay[leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + } + } + } + if (stplyr->hudrings < 0) // Draw the minus for ring debt { @@ -4257,7 +4292,7 @@ static void K_drawRingCounter(boolean gametypeinfoshown) if (stplyr->overdrive) { - V_DrawMappedPatch(LAPS_X+7-8, fy-5-8, V_HUDTRANS|V_SLIDEIN|splitflags, kp_overdrive[leveltime%32], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + V_DrawMappedPatch(LAPS_X+7-8, fy-5-8, V_HUDTRANS|V_SLIDEIN|splitflags, kp_overdrive[0][leveltime%32], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); } else { From 78b499cc76bf8c6e62bb565a2758f59010e2fe5a Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 1 Jul 2025 15:27:12 -0400 Subject: [PATCH 2/3] 4p amps: alright man --- src/k_hud.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 367acc5d8..043ebe530 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -4197,13 +4197,11 @@ static void K_drawRingCounter(boolean gametypeinfoshown) V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[0]->width) - 3) : 0), fy, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]); - UINT8 ampx = 2; - UINT8 ampy = 1; + UINT8 ampx = 2 + 8; + UINT8 ampy = 1 + 8; UINT8 odx = 11; UINT8 ody = 9; - V_DrawString(0, 0, splitflags, va("%d %d", fr, fy)); - if (stplyr->overdrive) { V_DrawMappedPatch(fr-odx, fy-3-ody, V_HUDTRANS|V_SLIDEIN|splitflags, kp_overdrive[1][leveltime%32], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); @@ -4216,10 +4214,10 @@ static void K_drawRingCounter(boolean gametypeinfoshown) { UINT8 amplevel = std::min(stplyr->amps / AMPLEVEL, 6); - V_DrawSmallMappedPatch(fr-ampx, fy-3-ampy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps[amplevel][leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + V_DrawMappedPatch(fr-ampx, fy-3-ampy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps[amplevel][leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); if (amplevel == 6) { - V_DrawSmallMappedPatch(fr-ampx, fy-3-ampy, V_ADD|V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps_underlay[leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); + V_DrawMappedPatch(fr-ampx, fy-3-ampy, V_ADD|V_HUDTRANS|V_SLIDEIN|splitflags, kp_amps_underlay[leveltime%12], R_GetTranslationColormap(TC_RAINBOW, static_cast(stplyr->skincolor), GTC_CACHE)); } } } From 7f01e4597b85ae30ceef1960280e1041e5cde8d4 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 1 Jul 2025 15:47:06 -0400 Subject: [PATCH 3/3] This sucks --- src/k_hud.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 043ebe530..8306e40b3 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -7700,16 +7700,17 @@ void K_drawKartHUD(void) } } + // This sucks, but we need to draw rings before EXP because 4P amps + // are fuckhuge and cover gameplay info if we don't. + // Propagate any changes below. if (LUA_HudEnabled(hud_gametypeinfo)) { if (gametyperules & GTR_CIRCUIT && !K_InRaceDuel()) { - K_drawKartLaps(); gametypeinfoshown = true; } else if (gametyperules & GTR_BUMPERS) { - K_drawKartBumpersOrKarma(); gametypeinfoshown = true; } } @@ -7733,6 +7734,23 @@ void K_drawKartHUD(void) K_drawRingCounter(gametypeinfoshown); } + // This sucks, but we need to draw rings before EXP because 4P amps + // are fuckhuge and cover gameplay info if we don't. + // Propagate any changes above. + if (LUA_HudEnabled(hud_gametypeinfo)) + { + if (gametyperules & GTR_CIRCUIT && !K_InRaceDuel()) + { + K_drawKartLaps(); + gametypeinfoshown = true; + } + else if (gametyperules & GTR_BUMPERS) + { + K_drawKartBumpersOrKarma(); + gametypeinfoshown = true; + } + } + // Draw the item window if (LUA_HudEnabled(hud_item) && !freecam) {