From d7e2c60d73e7aa3d564cc3d270b9c2a5355ed337 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 3 Nov 2022 13:35:51 +0000 Subject: [PATCH] 1.6 replay hut graphical fixes -- obviously redoing the whole thing later but important to get reasonable foundation to build off --- src/k_menudraw.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 92e47cb2f..ab9ed8b5e 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -3896,6 +3896,17 @@ static void M_DrawReplayHutReplayInfo(menudemo_t *demoref) if (demoref->gametype == GT_RACE) { V_DrawThinString(x, y+39, V_SNAPTOTOP|highlightflags, "TIME"); + } + else + { + V_DrawThinString(x, y+39, V_SNAPTOTOP|highlightflags, "SCORE"); + } + + if (demoref->standings[0].timeorscore == (UINT32_MAX-1)) + { + V_DrawThinString(x+32, y+39, V_SNAPTOTOP, "NO CONTEST"); + } + else if (demoref->gametype == GT_RACE) V_DrawRightAlignedString(x+84, y+40, V_SNAPTOTOP, va("%d'%02d\"%02d", G_TicsToMinutes(demoref->standings[0].timeorscore, true), G_TicsToSeconds(demoref->standings[0].timeorscore), @@ -3904,7 +3915,6 @@ static void M_DrawReplayHutReplayInfo(menudemo_t *demoref) } else { - V_DrawThinString(x, y+39, V_SNAPTOTOP|highlightflags, "SCORE"); V_DrawString(x+32, y+40, V_SNAPTOTOP, va("%d", demoref->standings[0].timeorscore)); } @@ -3913,7 +3923,7 @@ static void M_DrawReplayHutReplayInfo(menudemo_t *demoref) // Lat: 08/06/2020: For some reason missing skins have their value set to 255 (don't even ask me why I didn't write this) // and for an even STRANGER reason this passes the first check below, so we're going to make sure that the skin here ISN'T 255 before we do anything stupid. - if (demoref->standings[0].skin != 0xFF) + if (demoref->standings[0].skin < numskins) { patch = faceprefix[demoref->standings[0].skin][FACE_WANTED]; colormap = R_GetTranslationColormap( @@ -4114,7 +4124,7 @@ void M_DrawReplayStartMenu(void) // Lat: 08/06/2020: For some reason missing skins have their value set to 255 (don't even ask me why I didn't write this) // and for an even STRANGER reason this passes the first check below, so we're going to make sure that the skin here ISN'T 255 before we do anything stupid. - if (demoref->standings[i].skin != 0xFF) + if (demoref->standings[i].skin < numskins) { patch = faceprefix[demoref->standings[i].skin][FACE_RANK]; colormap = R_GetTranslationColormap(