diff --git a/src/k_hud.c b/src/k_hud.c index e356b3bb7..bd4e97e85 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -136,7 +136,7 @@ static patch_t *kp_racefinish[6]; static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES]; static patch_t *kp_winnernum[NUMPOSFRAMES]; -static patch_t *kp_facenum[MAXPLAYERS+1]; +patch_t *kp_facenum[MAXPLAYERS+1]; static patch_t *kp_facehighlight[8]; static patch_t *kp_nocontestminimap; diff --git a/src/k_hud.h b/src/k_hud.h index 65f4bf8b2..d1c34057c 100644 --- a/src/k_hud.h +++ b/src/k_hud.h @@ -66,6 +66,8 @@ extern consvar_t cv_colorizedhudcolor; extern consvar_t cv_newtabranking; +extern patch_t *kp_facenum[MAXPLAYERS+1]; + struct trackingResult_t { fixed_t x, y; diff --git a/src/y_inter.c b/src/y_inter.c index 240163853..3b953f6dd 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -49,16 +49,17 @@ #include "k_grandprix.h" #include "k_bot.h" // cv_botcanvote #include "r_fps.h" // R_GetTimeFrac +#include "k_hud.h" #include "k_itemlist.hpp" #ifdef HWRENDER #include "hardware/hw_main.h" #endif -#define ITEMLIST_PLAYER_YOFFSET 8 +#define ITEMLIST_PLAYER_YOFFSET 9 #define ITEMLIST_SCROLLSPEED (3 * FRACUNIT / 4) -#define ITEMLIST_SCROLLDELAY (TICRATE) -#define ITEMLIST_SCROLLREPEAT 2 +#define ITEMLIST_SCROLLDELAY (3 * TICRATE) +#define ITEMLIST_SCROLLREPEAT 1 typedef struct { @@ -571,15 +572,16 @@ void Y_IntermissionDrawer(void) if (dojitter) y--; - if (manyplayers16||displayitemrolls) + if (displayitemrolls) { - if (displayitemrolls) - V_SetClipRect((-vidxdiff - 2) * FRACUNIT, (36) * FRACUNIT, w*FRACUNIT, (h - 36)*FRACUNIT, 0); - - V_DrawPingNum(x + 6, ((displayitemrolls) ? y-2 : y+2) - (yscroll / FRACUNIT), 0, data.pos[i], NULL); - - if (displayitemrolls) - V_ClearClipRect(); + if (data.pos[i] < 0 || data.pos[i] > 16) + V_DrawPingNum(x+2, y+1, 0, data.pos[i], NULL); + else + V_DrawScaledPatch(x-5, y+1, 0, kp_facenum[data.pos[i]]); + } + else if (manyplayers16) + { + V_DrawPingNum(x + 6, y + 2, 0, data.pos[i], NULL); } else V_DrawCenteredString(x+6, y, 0, va("%d", data.pos[i])); @@ -589,10 +591,7 @@ void Y_IntermissionDrawer(void) UINT8 *colormap = R_GetTranslationColormap(*data.character[i], *data.color[i], GTC_CACHE); patch_t *facerank; - if (displayitemrolls) - facerank = faceprefix[*data.character[i]][FACE_MINIMAP]; - else - facerank = faceprefix[*data.character[i]][FACE_RANK]; + facerank = faceprefix[*data.character[i]][FACE_RANK]; fixed_t scale = FRACUNIT; @@ -612,14 +611,22 @@ void Y_IntermissionDrawer(void) yoffs = FixedMul(4, scale); if (displayitemrolls) - V_SetClipRect((-vidxdiff - 2) * FRACUNIT, (36) * FRACUNIT, w*FRACUNIT, (h - 36)*FRACUNIT, 0); + { + V_DrawFixedPatch( + ((x+11)*FRACUNIT) + ((facerank->leftoffset) * scale), + ((y+1)*FRACUNIT) + ((facerank->topoffset) * scale), + scale, + 0, + facerank, + colormap + ); - V_DrawFixedPatch((x+xoffs)< slen) ? slen_temp : slen); } } @@ -726,9 +724,7 @@ void Y_IntermissionDrawer(void) } else if (data.itemrolls && (intertic <= rolltic)) { - V_SetClipRect((-vidxdiff - 2) * FRACUNIT, (36) * FRACUNIT, w*FRACUNIT, (h - 36)*FRACUNIT, 0); - K_DrawItemList((INT32)(&players[data.num[i]] - players), (xx+2+slen) * FRACUNIT, ((y-1-(yscroll / FRACUNIT)) * FRACUNIT)); - V_ClearClipRect(); + K_DrawItemList((INT32)(&players[data.num[i]] - players), (xx+2+slen) * FRACUNIT, ((y+1) * FRACUNIT)); } else { @@ -781,7 +777,7 @@ void Y_IntermissionDrawer(void) { y += (displayitemrolls) ? ITEMLIST_PLAYER_YOFFSET : 18; - if ((!displayitemrolls) && i == NUMFORNEWCOLUMN-1) + if ((i % 16) == (((displayitemrolls) ? 2 : 1) * NUMFORNEWCOLUMN) - 1) { y = 41; x += BASEVIDWIDTH/2;