From 5d6d75385e7170f4f1a3216be913a04d2328e82d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Mon, 26 Dec 2016 07:41:52 -0500 Subject: [PATCH] - pulled some things out of the loop for the fill drawer --- src/r_draw_pal.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/r_draw_pal.cpp b/src/r_draw_pal.cpp index f700be7e2..15846977d 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);