Skip to content

Commit

Permalink
TrueColor: turn mask variables into macroses (#1229)
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Greffrath <fabian@greffrath.com>
  • Loading branch information
JNechaevsky and fabiangreffrath authored Sep 16, 2024
1 parent 3201b93 commit af1bd52
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 af1bd52

Please sign in to comment.