diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 15ece08dd..d51dbf227 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -3293,23 +3293,30 @@ static void drawspritelabel(int i) return; // 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; + uint8_t const spritecol = spritecol2d[sprite[i].picnum][(sprite[i].cstat&1)]; + int col = spritecol ? editorcolors[spritecol] : getspritecol(i); + int bordercol = col; + // group selection if (show2dsprite[i>>3]&pow2char[i&7]) { - bgcol = editorcolors[14]; - col = bgcol - (M32_THROB>>1); + bordercol = editorcolors[14]; + col = bordercol - (M32_THROB>>1); } else if (i == pointhighlight - 16384) - col += M32_THROB>>2; - else if (sprite[i].sectnum < 0) - col = bgcol = editorcolors[4]; // red + { + if (spritecol >= 8 && spritecol <= 15) + col -= M32_THROB>>1; + else col += M32_THROB>>2; - drawsmallabel(dabuffer, editorcolors[0], col, bgcol, sprite[i].x, sprite[i].y, sprite[i].z); + if (bordercol > col) + bordercol = col; + } + + else if (sprite[i].sectnum < 0) + col = bordercol = editorcolors[4]; // red + + drawsmallabel(dabuffer, editorcolors[0], col, bordercol, sprite[i].x, sprite[i].y, sprite[i].z); } #define EDITING_MAP_P() (newnumwalls>=0 || joinsector[0]>=0 || circlewall>=0 || (bstatus&1) || isc.active) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index defe3811d..54b571117 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -17314,19 +17314,13 @@ static void drawscreen_drawsprite(int32_t j, int32_t posxe, int32_t posye, int32 int16_t const flooraligned = (spr->cstat&32), wallaligned = (spr->cstat&16); int16_t const angofs = m32_sideview ? m32_sideang : 0; + uint8_t const spritecol = spritecol2d[spr->picnum][blocking]; // KEEPINSYNC build.c: drawspritelabel() if (spr->sectnum<0) col = editorcolors[4]; // red else - { - uint8_t const spritecol = spritecol2d[spr->picnum][0]; - - if (spritecol) - col = editorcolors[blocking ? spritecol2d[spr->picnum][1] : spritecol]; - else - col = getspritecol(j); - } + col = spritecol ? editorcolors[spritecol] : getspritecol(j); if (editstatus == 1) { @@ -17335,7 +17329,9 @@ static void drawscreen_drawsprite(int32_t j, int32_t posxe, int32_t posye, int32 (!m32_sideview && (spr->x == sprite[pointhighlight-16384].x && spr->y == sprite[pointhighlight-16384].y)))) { - col += M32_THROB>>2; + if (spritecol >= 8 && spritecol <= 15) + col -= M32_THROB>>1; + else col += M32_THROB>>2; } else // if (highlightcnt > 0) {