From 6e9203ea235eea0e68e41771585cef6feeb5e4e2 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 20 Nov 2015 20:26:52 +0000 Subject: [PATCH] Mapster32: in drawspritelabel(), use fixed background color. Make it always one of the colors that the 2D color cycles to (base color + offset in [0 .. 4]) instead of -3, as that one might be in a different color ramp. git-svn-id: https://svn.eduke32.com/eduke32@5434 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 6aaf32cbf..5b1be7cda 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -3289,23 +3289,24 @@ static void drawspritelabel(int i) if (!dabuffer[0]) return; -// int const blocking = (sprite[i].cstat & 1); - // KEEPINSYNC drawscreen_drawsprite() uint8_t const spritecol = spritecol2d[sprite[i].picnum][0]; uint8_t const blockingSpriteCol = spritecol2d[sprite[i].picnum][1]; int col = spritecol ? editorcolors[(sprite[i].cstat&1) ? blockingSpriteCol : spritecol] : getspritecol(i); + int bgcol = col; if (show2dsprite[i>>3]&pow2char[i&7]) - col = editorcolors[14] - (M32_THROB>>1); + { + bgcol = editorcolors[14]; + col = bgcol - (M32_THROB>>1); + } else if (i == pointhighlight - 16384) col += M32_THROB>>2; else if (sprite[i].sectnum < 0) - col = editorcolors[4]; // red + col = bgcol = editorcolors[4]; // red - drawsmallabel(dabuffer, editorcolors[0], col, /*blocking ? editorcolors[5] :*/ col - 3, - sprite[i].x, sprite[i].y, sprite[i].z); + drawsmallabel(dabuffer, editorcolors[0], col, bgcol, sprite[i].x, sprite[i].y, sprite[i].z); } #define EDITING_MAP_P() (newnumwalls>=0 || joinsector[0]>=0 || circlewall>=0 || (bstatus&1) || isc.active)