diff --git a/source/build/include/palette.h b/source/build/include/palette.h index 94df7d90b..09fdd2f6b 100644 --- a/source/build/include/palette.h +++ b/source/build/include/palette.h @@ -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); diff --git a/source/build/src/palette.cpp b/source/build/src/palette.cpp index 49153d1aa..ca018f02a 100644 --- a/source/build/src/palette.cpp +++ b/source/build/src/palette.cpp @@ -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; diff --git a/source/glbackend/hw_draw2d.cpp b/source/glbackend/hw_draw2d.cpp index 00b9a9cf1..ac16511f2 100644 --- a/source/glbackend/hw_draw2d.cpp +++ b/source/glbackend/hw_draw2d.cpp @@ -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]);