Make sprite tails and label borders purple if the sprite is blocking.

git-svn-id: https://svn.eduke32.com/eduke32@5670 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-03-15 22:17:04 +00:00
parent 99cb974d0c
commit 34f208afa2
3 changed files with 14 additions and 9 deletions

View file

@ -3293,9 +3293,11 @@ static void drawspritelabel(int i)
return; return;
// KEEPINSYNC drawscreen_drawsprite() // KEEPINSYNC drawscreen_drawsprite()
uint8_t const spritecol = spritecol2d[sprite[i].picnum][(sprite[i].cstat&1)]; tspritetype const * s = (tspritetype *)&sprite[i];
uint8_t const spritecol = spritecol2d[s->picnum][(s->cstat&1)];
int col = spritecol ? editorcolors[spritecol] : getspritecol(i); int col = spritecol ? editorcolors[spritecol] : getspritecol(i);
int bordercol = col; int const blocking = s->cstat & 1;
int bordercol = blocking ? editorcolors[5] : col;
// group selection // group selection
if (show2dsprite[i>>3]&pow2char[i&7]) if (show2dsprite[i>>3]&pow2char[i&7])
@ -3309,14 +3311,14 @@ static void drawspritelabel(int i)
col -= M32_THROB>>1; col -= M32_THROB>>1;
else col += M32_THROB>>2; else col += M32_THROB>>2;
if (bordercol > col) if (bordercol > col && !blocking)
bordercol = col; bordercol = col;
} }
else if (sprite[i].sectnum < 0) else if (s->sectnum < 0)
col = bordercol = editorcolors[4]; // red col = bordercol = editorcolors[4]; // red
drawsmallabel(dabuffer, editorcolors[0], col, bordercol, sprite[i].x, sprite[i].y, sprite[i].z); drawsmallabel(dabuffer, editorcolors[0], col, bordercol, s->x, s->y, s->z);
} }
#define EDITING_MAP_P() (newnumwalls>=0 || joinsector[0]>=0 || circlewall>=0 || (bstatus&1) || isc.active) #define EDITING_MAP_P() (newnumwalls>=0 || joinsector[0]>=0 || circlewall>=0 || (bstatus&1) || isc.active)

View file

@ -17320,7 +17320,7 @@ static void drawscreen_drawsprite(int32_t j, int32_t posxe, int32_t posye, int32
if (spr->sectnum<0) if (spr->sectnum<0)
col = editorcolors[4]; // red col = editorcolors[4]; // red
else else
col = spritecol ? editorcolors[spritecol] : getspritecol(j); col = spritecol ? editorcolors[spritecol] : blocking ? editorcolors[5] : getspritecol(j);
if (editstatus == 1) if (editstatus == 1)
{ {

View file

@ -887,8 +887,6 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
static char tempbuf[1024]; static char tempbuf[1024];
int32_t retfast = 0, lt; int32_t retfast = 0, lt;
Bmemset(tempbuf,0,sizeof(tempbuf));
if (!(onnames>=3 && onnames<=8) || (onnames==7 && sprite[spritenum].picnum!=SECTOREFFECTOR)) if (!(onnames>=3 && onnames<=8) || (onnames==7 && sprite[spritenum].picnum!=SECTOREFFECTOR))
retfast = 1; retfast = 1;
if (onnames==5 && !tileInGroup(tilegroupItems, sprite[spritenum].picnum)) if (onnames==5 && !tileInGroup(tilegroupItems, sprite[spritenum].picnum))
@ -896,6 +894,8 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
if (onnames==6 && sprite[spritenum].picnum != sprite[cursprite].picnum) if (onnames==6 && sprite[spritenum].picnum != sprite[cursprite].picnum)
retfast = 1; retfast = 1;
tempbuf[0] = 0;
if (retfast) if (retfast)
return tempbuf; return tempbuf;
@ -905,7 +905,9 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
if ((sprite[spritenum].lotag|sprite[spritenum].hitag) == 0) if ((sprite[spritenum].lotag|sprite[spritenum].hitag) == 0)
{ {
Bmemset(tempbuf, 0, sizeof(tempbuf));
SpriteName(spritenum,lo); SpriteName(spritenum,lo);
if (lo[0]!=0) if (lo[0]!=0)
{ {
Bsprintf(tempbuf,"%s",lo); Bsprintf(tempbuf,"%s",lo);
@ -925,14 +927,15 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
{ {
if (onnames!=8) if (onnames!=8)
{ {
Bmemset(tempbuf, 0, sizeof(tempbuf));
Bsprintf(lo,"%s",SectorEffectorText(spritenum)); Bsprintf(lo,"%s",SectorEffectorText(spritenum));
Bsprintf(tempbuf,"%s, %s",lo, histr); Bsprintf(tempbuf,"%s, %s",lo, histr);
} }
} }
else else
{ {
Bmemset(tempbuf, 0, sizeof(tempbuf));
taglab_handle1(lt&1, sprite[spritenum].lotag, lostr); taglab_handle1(lt&1, sprite[spritenum].lotag, lostr);
SpriteName(spritenum,lo); SpriteName(spritenum,lo);
if (sprite[spritenum].extra != -1) if (sprite[spritenum].extra != -1)