From 74c7157d74ae3f55cc361666df17864b67238968 Mon Sep 17 00:00:00 2001 From: Julia Nechaevskaya Date: Mon, 16 Sep 2024 10:12:49 +0300 Subject: [PATCH] Turn mask variables into macroses Co-Authored-By: Fabian Greffrath --- src/i_video.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i_video.c b/src/i_video.c index 87880be2d..e7ef10ecd 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -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]; @@ -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); @@ -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;