- refactoring of the lookup tables.

This commit is contained in:
Christoph Oelckers 2020-05-23 14:40:54 +02:00
parent daf77e55f7
commit f929419a0a
23 changed files with 406 additions and 538 deletions

View file

@ -241,8 +241,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 unsigned char palfadedelta ;
extern PalEntry palfadergb;
void DrawFullscreenBlends()
{
@ -255,11 +254,11 @@ void DrawFullscreenBlends()
GLInterface.EnableBlend(true);
GLInterface.UseColorOnly(true);
if (palfadedelta > 0)
if (palfadergb.a > 0)
{
// Todo: reroute to the 2D drawer
GLInterface.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]);
GLInterface.SetColorub(palfadergb.r, palfadergb.g, palfadergb.b, palfadedelta);
GLInterface.SetColorub(palfadergb.r, palfadergb.g, palfadergb.b, palfadergb.a);
GLInterface.Draw(DT_TRIANGLE_STRIP, FFlatVertexBuffer::PRESENT_INDEX, 4);
}
if (tint_blood_r | tint_blood_g | tint_blood_b)