mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
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:
parent
99cb974d0c
commit
34f208afa2
3 changed files with 14 additions and 9 deletions
|
@ -3293,9 +3293,11 @@ static void drawspritelabel(int i)
|
|||
return;
|
||||
|
||||
// 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 bordercol = col;
|
||||
int const blocking = s->cstat & 1;
|
||||
int bordercol = blocking ? editorcolors[5] : col;
|
||||
|
||||
// group selection
|
||||
if (show2dsprite[i>>3]&pow2char[i&7])
|
||||
|
@ -3309,14 +3311,14 @@ static void drawspritelabel(int i)
|
|||
col -= M32_THROB>>1;
|
||||
else col += M32_THROB>>2;
|
||||
|
||||
if (bordercol > col)
|
||||
if (bordercol > col && !blocking)
|
||||
bordercol = col;
|
||||
}
|
||||
|
||||
else if (sprite[i].sectnum < 0)
|
||||
else if (s->sectnum < 0)
|
||||
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)
|
||||
|
|
|
@ -17320,7 +17320,7 @@ static void drawscreen_drawsprite(int32_t j, int32_t posxe, int32_t posye, int32
|
|||
if (spr->sectnum<0)
|
||||
col = editorcolors[4]; // red
|
||||
else
|
||||
col = spritecol ? editorcolors[spritecol] : getspritecol(j);
|
||||
col = spritecol ? editorcolors[spritecol] : blocking ? editorcolors[5] : getspritecol(j);
|
||||
|
||||
if (editstatus == 1)
|
||||
{
|
||||
|
|
|
@ -887,8 +887,6 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
|
|||
static char tempbuf[1024];
|
||||
int32_t retfast = 0, lt;
|
||||
|
||||
Bmemset(tempbuf,0,sizeof(tempbuf));
|
||||
|
||||
if (!(onnames>=3 && onnames<=8) || (onnames==7 && sprite[spritenum].picnum!=SECTOREFFECTOR))
|
||||
retfast = 1;
|
||||
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)
|
||||
retfast = 1;
|
||||
|
||||
tempbuf[0] = 0;
|
||||
|
||||
if (retfast)
|
||||
return tempbuf;
|
||||
|
||||
|
@ -905,7 +905,9 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
|
|||
|
||||
if ((sprite[spritenum].lotag|sprite[spritenum].hitag) == 0)
|
||||
{
|
||||
Bmemset(tempbuf, 0, sizeof(tempbuf));
|
||||
SpriteName(spritenum,lo);
|
||||
|
||||
if (lo[0]!=0)
|
||||
{
|
||||
Bsprintf(tempbuf,"%s",lo);
|
||||
|
@ -925,14 +927,15 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
|
|||
{
|
||||
if (onnames!=8)
|
||||
{
|
||||
Bmemset(tempbuf, 0, sizeof(tempbuf));
|
||||
Bsprintf(lo,"%s",SectorEffectorText(spritenum));
|
||||
Bsprintf(tempbuf,"%s, %s",lo, histr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bmemset(tempbuf, 0, sizeof(tempbuf));
|
||||
taglab_handle1(lt&1, sprite[spritenum].lotag, lostr);
|
||||
|
||||
SpriteName(spritenum,lo);
|
||||
|
||||
if (sprite[spritenum].extra != -1)
|
||||
|
|
Loading…
Reference in a new issue