Skip to content

Commit

Permalink
Customizable Crispness menu background. (#777)
Browse files Browse the repository at this point in the history
* Load an alternative Crispness menu background from a CRISPYBG lump (if present).

* Only minimum size matters, E.G. Heretic-style 64x128 flats should still work.

* Have that tab back.

* * Fix code/declaration mixup.
* Match indentation of surrounding code.
  • Loading branch information
NeuralStunner authored Nov 6, 2021
1 parent b47cd94 commit 2cbcd0c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/doom/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,10 +1392,16 @@ static void M_DrawMouse(void)
#include "m_background.h"
static void M_DrawCrispnessBackground(void)
{
const byte *const src = crispness_background;
const byte *src = crispness_background;
pixel_t *dest;
int x, y;

// [NS] Try to load the background from a lump.
int lump = W_CheckNumForName("CRISPYBG");
if (lump != -1 && W_LumpLength(lump) >= 64*64)
{
src = W_CacheLumpNum(lump, PU_STATIC);
}
dest = I_VideoBuffer;

for (y = 0; y < SCREENHEIGHT; y++)
Expand Down

0 comments on commit 2cbcd0c

Please sign in to comment.