diff --git a/common/2d/2dsline.cpp b/common/2d/2dsline.cpp index 342c4636c..7fae60c2c 100644 --- a/common/2d/2dsline.cpp +++ b/common/2d/2dsline.cpp @@ -42,7 +42,7 @@ static void gr_linear_darken(uint8_t *const dest, unsigned darkening_level, unsi #ifdef OGL static #endif -void gr_uscanline(unsigned x1, unsigned x2, unsigned y) +void gr_uscanline(const unsigned x1, const unsigned x2, const unsigned y, const uint8_t color) { switch(TYPE) { @@ -55,7 +55,7 @@ void gr_uscanline(unsigned x1, unsigned x2, unsigned y) const auto cv_fade_level = grd_curcanv->cv_fade_level; const auto count = x2 - x1 + 1; if (cv_fade_level >= gr_fade_table.size()) - gr_linear_stosd(data, static_cast(COLOR), count); + gr_linear_stosd(data, static_cast(color), count); else gr_linear_darken(data, cv_fade_level, count, gr_fade_table); } @@ -63,7 +63,7 @@ void gr_uscanline(unsigned x1, unsigned x2, unsigned y) } } -void gr_scanline(int x1, int x2, unsigned y) +void gr_scanline(int x1, int x2, const unsigned y, const uint8_t color) { if (y >= MAXY) return; @@ -76,7 +76,7 @@ void gr_scanline(int x1, int x2, unsigned y) if (x1 < MINX) x1 = MINX; if (x2 > MAXX) x2 = MAXX; - gr_uscanline(x1, x2, y); + gr_uscanline(x1, x2, y, color); } } diff --git a/common/2d/disc.cpp b/common/2d/disc.cpp index 00d619397..3e6f4e90b 100644 --- a/common/2d/disc.cpp +++ b/common/2d/disc.cpp @@ -34,26 +34,27 @@ int gr_disk(fix xc1,fix yc1,fix r1) if ( (yc+r) < 0 ) return 1; if ( (yc-r) > GHEIGHT ) return 1; + const auto color = COLOR; while(x font);