Use constexpr uint8_t for TRANSPARENCY_COLOR

This encourages std::fill_n to become memset.  When TRANSPARENCY_COLOR
is `#define`'d to 255, it is an integer literal of type `int`.
This commit is contained in:
Kp 2020-05-22 02:40:26 +00:00
parent 7b52b1fe1d
commit c4c09963ae

View file

@ -31,7 +31,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "u_mem.h"
// some defines for transparency and blending
#define TRANSPARENCY_COLOR 255 // palette entry of transparency color -- 255 on the PC
constexpr uint8_t TRANSPARENCY_COLOR = 255; // palette entry of transparency color -- 255 on the PC
#define GR_FADE_LEVELS 34u
#define GR_FADE_OFF GR_FADE_LEVELS // yes, max means OFF - don't screw that up
enum gr_blend {