Skip to content

Commit 2cbcd0c

Browse files
Customizable Crispness menu background. (#777)
* 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.
1 parent b47cd94 commit 2cbcd0c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/doom/m_menu.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,10 +1392,16 @@ static void M_DrawMouse(void)
13921392
#include "m_background.h"
13931393
static void M_DrawCrispnessBackground(void)
13941394
{
1395-
const byte *const src = crispness_background;
1395+
const byte *src = crispness_background;
13961396
pixel_t *dest;
13971397
int x, y;
13981398

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

14011407
for (y = 0; y < SCREENHEIGHT; y++)

0 commit comments

Comments
 (0)