mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Let's be consistent with how other parts of the code handle this same issue of conditional operations surrounding non-conditional operations.
This commit is contained in:
parent
cfcd25f2cd
commit
46e50a523f
1 changed files with 8 additions and 8 deletions
16
src/m_menu.c
16
src/m_menu.c
|
|
@ -4829,6 +4829,7 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
||||||
const INT32 my = 24;
|
const INT32 my = 24;
|
||||||
patch_t *patch;
|
patch_t *patch;
|
||||||
INT32 i, o, j, prev, next;
|
INT32 i, o, j, prev, next;
|
||||||
|
boolean loophack = false;
|
||||||
|
|
||||||
// Black BG
|
// Black BG
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
@ -4858,12 +4859,16 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
||||||
o = ((char_scroll / FRACUNIT) + 16);
|
o = ((char_scroll / FRACUNIT) + 16);
|
||||||
|
|
||||||
if (o < 0) // This hack is to prevent visual glitches when looping from the last character to the 1st character.
|
if (o < 0) // This hack is to prevent visual glitches when looping from the last character to the 1st character.
|
||||||
{
|
loophack = true;
|
||||||
|
|
||||||
|
if (loophack)
|
||||||
o += 128;
|
o += 128;
|
||||||
|
|
||||||
i = (o / 128);
|
i = (o / 128);
|
||||||
o = (o % 128);
|
o = (o % 128);
|
||||||
|
|
||||||
|
if (loophack)
|
||||||
|
{
|
||||||
j = i;
|
j = i;
|
||||||
do // subtract 1 from i to counteract the +128 from the prior hack
|
do // subtract 1 from i to counteract the +128 from the prior hack
|
||||||
{
|
{
|
||||||
|
|
@ -4872,11 +4877,6 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
||||||
i = (currentMenu->numitems - 1);
|
i = (currentMenu->numitems - 1);
|
||||||
} while (i != j && PlayerMenu[i].status & IT_DISABLED);
|
} while (i != j && PlayerMenu[i].status & IT_DISABLED);
|
||||||
}
|
}
|
||||||
else // Regular circumstances
|
|
||||||
{
|
|
||||||
i = (o / 128);
|
|
||||||
o = (o % 128);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get prev character...
|
// Get prev character...
|
||||||
prev = i;
|
prev = i;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue