From 3a53d6d3b9bf304ebaf057cca074f67409771a8e Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 4 Nov 2018 21:48:47 +0000 Subject: [PATCH] Properly support widescreen in Y_IntermissionDrawer (I meant to do this in charscleanup but forgot). --- src/y_inter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 3ed06352..6c3226bb 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -417,6 +417,7 @@ void Y_IntermissionDrawer(void) { #define NUMFORNEWCOLUMN 8 INT32 y = 41, gutter = ((data.match.numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2)); + INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2; const char *timeheader; if (data.match.rankingsmode) @@ -426,7 +427,7 @@ void Y_IntermissionDrawer(void) // draw the level name V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 12, 0, data.match.levelstring); - V_DrawFill(x, 34, 312, 1, 0); + V_DrawFill((x-3) - duptweak, 34, dupadjust-2, 1, 0); if (data.match.encore) V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 12-8, hilicol, "ENCORE MODE"); @@ -434,7 +435,7 @@ void Y_IntermissionDrawer(void) if (!gutter) { V_DrawFill(x+156, 24, 1, 158, 0); - V_DrawFill(x, 182, 312, 1, 0); + V_DrawFill((x-3) - duptweak, 182, dupadjust-2, 1, 0); V_DrawCenteredString(x+6+(BASEVIDWIDTH/2), 24, hilicol, "#"); V_DrawString(x+36+(BASEVIDWIDTH/2), 24, hilicol, "NAME");