From 6a2556b0be869a3f1ac990575ef165f42c385045 Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Fri, 24 Jan 2025 18:27:44 +0100 Subject: [PATCH] Fix screen fade colors ...and what the hell happened in r_draw? --- src/doomdef.h | 4 ++++ src/p_setup.c | 6 +++--- src/r_draw.cpp | 8 -------- src/st_stuff.c | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index c24e1000f..bb4beb041 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -217,6 +217,10 @@ extern char logfilename[1024]; #define MAXCOLORNAME 32 #define NUMCOLORFREESLOTS UINT16_MAX +// surely nobody's gonna change the palette a second time :Clueless: +#define FADECOLOR 0 // 120 +#define ENCOREFADECOLOR 209 // 122 + // Master Server compatibility ONLY #define MSCOMPAT_MAXPLAYERS (32) diff --git a/src/p_setup.c b/src/p_setup.c index 3ff6eecba..7fc414157 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -8162,13 +8162,13 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) S_StartSound(NULL, sfx_ruby1); F_WipeStartScreen(); - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 122); + V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, ENCOREFADECOLOR); F_WipeEndScreen(); F_RunWipe(wipedefs[wipe_encore_towhite], false); F_WipeStartScreen(); - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120); + V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, FADECOLOR); F_WipeEndScreen(); F_RunWipe(wipedefs[wipe_level_final], false); @@ -8247,7 +8247,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) } } - levelfadecol = (encoremode && !ranspecialwipe ? 122 : 120); + levelfadecol = (encoremode && !ranspecialwipe ? ENCOREFADECOLOR : FADECOLOR); // Let's fade to white here // But only if we didn't do the encore startup wipe diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 5d6591b02..00488b78d 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -150,14 +150,6 @@ float zeroheight; #define INTERMISSION_TT_CACHE_INDEX (MAXSKINS + 8) #define TT_CACHE_SIZE (MAXSKINS + 9) -#define SKIN_RAMP_LENGTH 16 -#define DEFAULT_STARTTRANSCOLOR 160 -#define NUM_PALETTE_ENTRIES 256 - -#define SKIN_RAMP_LENGTH 16 -#define DEFAULT_STARTTRANSCOLOR 96 -#define NUM_PALETTE_ENTRIES 256 - static UINT8 **translationtablecache[TT_CACHE_SIZE] = {NULL}; UINT8 skincolor_modified[MAXSKINCOLORS]; diff --git a/src/st_stuff.c b/src/st_stuff.c index 64a757c83..705d303fa 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -895,9 +895,9 @@ void ST_Drawer(void) if (timeinmap < 15) { if (timeinmap <= 5) - V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts + V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,FADECOLOR); // Pure white on first few frames, to hide SRB2's awful level load artifacts else - V_DrawFadeScreen(120, 15-timeinmap); // Then gradually fade out from there + V_DrawFadeScreen(FADECOLOR, 15-timeinmap); // Then gradually fade out from there } if (stagetitle)