From 4557ce0253801b70802c59419012abcc43cc9bf7 Mon Sep 17 00:00:00 2001 From: spherallic Date: Fri, 5 Jul 2024 22:42:14 +0200 Subject: [PATCH] NiGHTS mode: move timer and closed caption positions --- src/screen.c | 6 ++---- src/st_stuff.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/screen.c b/src/screen.c index 014a20117..191c8638a 100644 --- a/src/screen.c +++ b/src/screen.c @@ -493,11 +493,9 @@ void SCR_ClosedCaptions(void) basey -= 42; else if (splitscreen) basey -= 8; - else if ((modeattacking == ATTACKING_NIGHTS) - || (!(maptol & TOL_NIGHTS) - && LUA_HudEnabled(hud_powerups) + else if (LUA_HudEnabled(hud_powerups) && ((cv_powerupdisplay.value == 2) // "Always" - || (cv_powerupdisplay.value == 1 && !camera.chase)))) // "First-person only" + || (cv_powerupdisplay.value == 1 && !camera.chase))) // "First-person only" basey -= 16; } diff --git a/src/st_stuff.c b/src/st_stuff.c index e088a448c..6a83e99ea 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2078,24 +2078,25 @@ static void ST_drawNiGHTSHUD(void) if (!stplyr->exiting && !oldspecialstage && LUA_HudEnabled(hud_nightsscore)) ST_DrawNightsOverlayNum(304<marescore, nightsnum, SKINCOLOR_AZURE); - // TODO give this its own section for Lua + // TODO: give this its own section for Lua + // TODO: on multi-mare maps, show time & grade for each completed mare if (!stplyr->exiting && LUA_HudEnabled(hud_nightsscore)) { if (modeattacking == ATTACKING_NIGHTS) { INT32 maretime = max(stplyr->realtime - stplyr->marebegunat, 0); -#define VFLAGS V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_PERPLAYER|V_HUDTRANS - V_DrawScaledPatch(BASEVIDWIDTH-22, BASEVIDHEIGHT-20, VFLAGS, W_CachePatchName("NGRTIMER", PU_HUDGFX)); - V_DrawPaddedTallNum(BASEVIDWIDTH-22, BASEVIDHEIGHT-20, VFLAGS, G_TicsToCentiseconds(maretime), 2); - V_DrawScaledPatch(BASEVIDWIDTH-46, BASEVIDHEIGHT-20, VFLAGS, sboperiod); +#define VFLAGS V_SNAPTOTOP|V_SNAPTORIGHT|V_PERPLAYER|V_HUDTRANS + V_DrawScaledPatch(BASEVIDWIDTH-16, 40, VFLAGS, W_CachePatchName("NGRTIMER", PU_HUDGFX)); + V_DrawPaddedTallNum(BASEVIDWIDTH-16, 40, VFLAGS, G_TicsToCentiseconds(maretime), 2); + V_DrawScaledPatch(BASEVIDWIDTH-40, 40, VFLAGS, sboperiod); if (maretime < 60*TICRATE) - V_DrawTallNum(BASEVIDWIDTH-46, BASEVIDHEIGHT-20, VFLAGS, G_TicsToSeconds(maretime)); + V_DrawTallNum(BASEVIDWIDTH-40, 40, VFLAGS, G_TicsToSeconds(maretime)); else { - V_DrawPaddedTallNum(BASEVIDWIDTH-46, BASEVIDHEIGHT-20, VFLAGS, G_TicsToSeconds(maretime), 2); - V_DrawScaledPatch(BASEVIDWIDTH-70, BASEVIDHEIGHT-20, VFLAGS, sbocolon); - V_DrawTallNum(BASEVIDWIDTH-70, BASEVIDHEIGHT-20, VFLAGS, G_TicsToMinutes(maretime, true)); + V_DrawPaddedTallNum(BASEVIDWIDTH-40, 40, VFLAGS, G_TicsToSeconds(maretime), 2); + V_DrawScaledPatch(BASEVIDWIDTH-64, 40, VFLAGS, sbocolon); + V_DrawTallNum(BASEVIDWIDTH-64, 40, VFLAGS, G_TicsToMinutes(maretime, true)); } #undef VFLAGS }