From 4a15cf5fd3f06e20efbd977f9dc60b0853d7fd71 Mon Sep 17 00:00:00 2001 From: Rebmiami <59275598+Rebmiami@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:17:57 -0500 Subject: [PATCH] Fixed LDTC -> PAPR mark color and adjust fading --- src/simulation/elements/LDTC.cpp | 2 +- src/simulation/elements/PAPR.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/simulation/elements/LDTC.cpp b/src/simulation/elements/LDTC.cpp index efa114bee..63868c867 100644 --- a/src/simulation/elements/LDTC.cpp +++ b/src/simulation/elements/LDTC.cpp @@ -192,7 +192,7 @@ static int update(UPDATE_FUNC_ARGS) if (photonWl & bit) { parts[ID(r)].life = 1; - parts[ID(r)].dcolour = 0x1080820; + parts[ID(r)].dcolour = 0xFF0F0820; } else { diff --git a/src/simulation/elements/PAPR.cpp b/src/simulation/elements/PAPR.cpp index af32405ea..b1799d146 100644 --- a/src/simulation/elements/PAPR.cpp +++ b/src/simulation/elements/PAPR.cpp @@ -112,7 +112,7 @@ static int graphics(GRAPHICS_FUNC_ARGS) if(gfctx.ren->decorations_enable && !gfctx.ren->blackDecorations) { // Burnt paper has more faded colors - float alpha = (((cpart->dcolour >> 24) & 0xFF) - restrict_flt((burnAmount - 450) * 1.5f, 0, 255)) / 255.f; + float alpha = restrict_flt(((cpart->dcolour >> 24) & 0xFF) - (burnAmount - 450) * 1.7f, 0, 255) / 255.f; *colr = int(*colr * (1 - alpha) + ((cpart->dcolour >> 16) & 0xFF) * alpha); *colg = int(*colg * (1 - alpha) + ((cpart->dcolour >> 8) & 0xFF) * alpha); *colb = int(*colb * (1 - alpha) + ((cpart->dcolour) & 0xFF) * alpha); @@ -127,15 +127,15 @@ static int graphics(GRAPHICS_FUNC_ARGS) // Darken when burnt if (burnAmount > 450) { - *colr -= (int)restrict_flt((burnAmount - 450) * 1.2f, 0, 230); - *colg -= (int)restrict_flt((burnAmount - 450) * 1.4f, 0, 240); - *colb -= (int)restrict_flt((burnAmount - 450) * 1.7f, 0, 197); + *colr -= (int)restrict_flt((burnAmount - 450) * 1.2f, 0, 220); + *colg -= (int)restrict_flt((burnAmount - 450) * 1.4f, 0, 230); + *colb -= (int)restrict_flt((burnAmount - 450) * 1.6f, 0, 197); } if (cpart->tmp) { *pixel_mode |= PMODE_GLOW; float flash = (cpart->tmp & 0xF) / 3.f; - *cola = flash * 200; + *cola = int(flash * 200); *colr = int(*colr * (1 - flash)); *colg = int(*colg * (1 - flash)); *colb = int(*colb * (1 - flash));