delet if else hell

This commit is contained in:
Alug committed 2025-01-26 18:18:33 +01:00
1 parent 39c747e430
commit b09025df08
1 file changed
+5 -18
+5 -18
View File
@@ -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),