Skip to content

Commit

Permalink
Improvements to help screen background
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Nov 2, 2023
1 parent 35a4c79 commit 7f5d8d0
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,22 +601,34 @@ static void M_DrawHelpBackground(void)

M_BigSeed(411);

for (int y = 0; y < SCREENAREA; y += 2 * SCREENWIDTH)
for (int x = 0; x < SCREENWIDTH; x += 2)
if (r_detail == r_detail_high)
{
for (int i = 0; i < SCREENAREA; i++)
{
byte *dot1 = *screens + y + x;
byte *dot2 = dot1 + 1;
byte *dot3 = dot2 + SCREENWIDTH;
byte *dot4 = dot3 - 1;
const byte color = colormaps[0][M_BigRandomInt(0, 3) * 256
+ blues[tinttab50[(tinttab50[(*dot1 << 8) + *dot2] << 8)
+ tinttab50[(*dot3 << 8) + *dot4]]]];

*dot1 = color;
*dot2 = color;
*dot3 = color;
*dot4 = color;
byte *dot = *screens + i;

*dot = colormaps[0][M_BigRandomInt(0, 3) * 256 + blues[*dot]];
}
}
else
for (int y = 0; y < SCREENAREA; y += 2 * SCREENWIDTH)
for (int x = 0; x < SCREENWIDTH; x += 2)
{
byte *dot1 = *screens + y + x;
byte *dot2 = dot1 + 1;
byte *dot3 = dot2 + SCREENWIDTH;
byte *dot4 = dot3 - 1;
const byte color = colormaps[0][M_BigRandomInt(0, 3) * 256
+ blues[tinttab50[(tinttab50[(*dot1 << 8) + *dot2] << 8)
+ tinttab50[(*dot3 << 8) + *dot4]]]];

*dot1 = color;
*dot2 = color;
*dot3 = color;
*dot4 = color;
}

M_DrawMenuBorder();

if (mapwindow)
memset(mapscreen, nearestblack, MAPAREA);
Expand Down

0 comments on commit 7f5d8d0

Please sign in to comment.