From b09025df08cadac4d0330420f5f5eda99d00f8d7 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 26 Jan 2025 18:18:23 +0100 Subject: [PATCH] delet if else hell --- src/y_inter.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 32454a685..505c85997 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -945,29 +945,16 @@ static void Y_DrawVoteScreenPatch(void) return; } - patch_t *votebg = bgpatch; + patch_t *votebg = bgpatch; // non widescreen patch + UINT8 prefgametype = (votelevels[0][1] & ~0x80); const boolean widebgreplaced = (prefgametype == GT_MATCH) ? widebattlereplaced : wideracereplaced; const boolean bgreplaced = (prefgametype == GT_MATCH) ? battlereplaced : racereplaced; - // this is horrid - if (widescreen) + if ((widescreen && (widebgreplaced || !bgreplaced)) + || (!widescreen && (widebgreplaced && !bgreplaced))) { - if (widebgreplaced) - votebg = widebgpatch; - else if (bgreplaced) - votebg = bgpatch; - else - votebg = widebgpatch; - } - else - { - if (bgreplaced) - votebg = bgpatch; - else if (widebgreplaced) - votebg = widebgpatch; - else - votebg = bgpatch; + votebg = widebgpatch; } V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(votebg->width)/2),