- make palfadedelta explicitly unsigned

This commit is contained in:
Christoph Oelckers 2020-01-19 23:18:38 +01:00
parent c8fa2443d3
commit aa1361acbb
3 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ typedef struct {
} rgb24_t;
extern palette_t curpalette[256], curpalettefaded[256], palfadergb;
extern char palfadedelta;
extern unsigned char palfadedelta;
void paletteMakeLookupTable(int32_t palnum, const char *remapbuf, uint8_t r, uint8_t g, uint8_t b, char noFloorPal);
void paletteSetColorTable(int32_t id, uint8_t const *table, bool transient = false);
void paletteFreeColorTable(int32_t id);

View file

@ -27,7 +27,7 @@ uint32_t g_lastpalettesum = 0;
palette_t curpalette[256]; // the current palette, unadjusted for brightness or tint
palette_t curpalettefaded[256]; // the current palette, adjusted for brightness and tint (ie. what gets sent to the card)
palette_t palfadergb = { 0, 0, 0, 0 };
char palfadedelta = 0;
unsigned char palfadedelta = 0;
int32_t realmaxshade;
float frealmaxshade;

View file

@ -232,7 +232,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer)
static int32_t tint_blood_r = 0, tint_blood_g = 0, tint_blood_b = 0;
extern palette_t palfadergb;
extern char palfadedelta ;
extern unsigned char palfadedelta ;
void DrawFullscreenBlends()
{
@ -245,7 +245,7 @@ void DrawFullscreenBlends()
GLInterface.EnableBlend(true);
GLInterface.UseColorOnly(true);
if (palfadedelta)
if (palfadedelta > 0)
{
// Todo: reroute to the 2D drawer
GLInterface.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]);