diff --git a/src/r_draw_pal.cpp b/src/r_draw_pal.cpp index f700be7e27..15846977de 100644 --- a/src/r_draw_pal.cpp +++ b/src/r_draw_pal.cpp @@ -1495,11 +1495,11 @@ namespace swrenderer } else { + int src_r = ((_srccolor >> 16) & 0xff) * _srcalpha; + int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha; + int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha; do { - int src_r = ((_srccolor >> 16) & 0xff) * _srcalpha; - int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha; - int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha; int r = clamp((src_r + pal[*dest].r * _destalpha)>>18, 0, 255); int g = clamp((src_g + pal[*dest].g * _destalpha)>>18, 0, 255); int b = clamp((src_b + pal[*dest].b * _destalpha)>>18, 0, 255); @@ -1551,11 +1551,11 @@ namespace swrenderer } else { + int src_r = ((_srccolor >> 16) & 0xff) * _srcalpha; + int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha; + int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha; do { - int src_r = ((_srccolor >> 16) & 0xff) * _srcalpha; - int src_g = ((_srccolor >> 0) & 0xff) * _srcalpha; - int src_b = ((_srccolor >> 8) & 0xff) * _srcalpha; int r = clamp((src_r + pal[*dest].r * _destalpha)>>18, 0, 255); int g = clamp((src_g + pal[*dest].g * _destalpha)>>18, 0, 255); int b = clamp((src_b + pal[*dest].b * _destalpha)>>18, 0, 255);