Skip to content

Commit

Permalink
Turn mask variables into macroses
Browse files Browse the repository at this point in the history
Co-Authored-By: Fabian Greffrath <[email protected]>
  • Loading branch information
JNechaevsky and fabiangreffrath committed Sep 16, 2024
1 parent 3201b93 commit 74c7157
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ static SDL_Texture *bluepane = NULL;
static SDL_Texture *graypane = NULL;
static SDL_Texture *orngpane = NULL;
static int pane_alpha;
static unsigned int rmask, gmask, bmask, amask; // [crispy] moved up here
extern pixel_t* pal_color; // [crispy] evil hack to get FPS dots working as in Vanilla
#else
static SDL_Color palette[256];
Expand Down Expand Up @@ -1631,10 +1630,6 @@ static void SetVideoMode(void)
if (argbbuffer == NULL)
{
#ifdef CRISPY_TRUECOLOR
int bpp;

SDL_PixelFormatEnumToMasks(SDL_PIXELFORMAT_ARGB8888, &bpp,
&rmask, &gmask, &bmask, &amask);
argbbuffer = SDL_CreateRGBSurfaceWithFormat(
0, SCREENWIDTH, SCREENHEIGHT, 32, SDL_PIXELFORMAT_ARGB8888);

Expand Down Expand Up @@ -2112,6 +2107,11 @@ void I_BindVideoVariables(void)
}

#ifdef CRISPY_TRUECOLOR
#define amask (0xFF000000U)
#define rmask (0x00FF0000U)
#define gmask (0x0000FF00U)
#define bmask (0x000000FFU)

const pixel_t I_BlendAdd (const pixel_t bg, const pixel_t fg)
{
uint32_t r, g, b;
Expand Down

0 comments on commit 74c7157

Please sign in to comment.