- SW: eliminated the only use of the SPRITE_TAG1 macro.

This commit is contained in:
Christoph Oelckers 2021-10-11 23:02:54 +02:00
parent 9f7b7ebf7c
commit afce1aba88
2 changed files with 7 additions and 7 deletions

View file

@ -168,8 +168,9 @@ void CopySectorMatch(short match)
itsec.Reset(src_sp->sectnum);
while ((src_move = itsec.NextIndex()) >= 0)
{
auto sp = &sprite[src_move];
// don't move ST1 Copy Tags
if (SPRITE_TAG1(src_move) != SECT_COPY_SOURCE)
if (SP_TAG1(sp) != SECT_COPY_SOURCE)
{
int sx,sy,dx,dy,src_xoff,src_yoff,trash;
@ -180,12 +181,12 @@ void CopySectorMatch(short match)
SectorMidPoint(dest_sp->sectnum, &dx, &dy, &trash);
// get offset
src_xoff = sx - sprite[src_move].x;
src_yoff = sy - sprite[src_move].y;
src_xoff = sx - sp->x;
src_yoff = sy - sp->y;
// move sprite to dest sector
sprite[src_move].x = dx - src_xoff;
sprite[src_move].y = dy - src_yoff;
sp->x = dx - src_xoff;
sp->y = dy - src_yoff;
// change sector
changespritesect(src_move, dest_sp->sectnum);
@ -196,7 +197,7 @@ void CopySectorMatch(short match)
SECTOR_OBJECTp sop;
// find and add sprite to SO
sop = DetectSectorObject(&sector[sprite[src_move].sectnum]);
sop = DetectSectorObject(&sector[sp->sectnum]);
AddSpriteToSectorObject(src_move, sop);
// update sprites postions so they aren't in the

View file

@ -198,7 +198,6 @@ inline int32_t FIXED(int32_t msw, int32_t lsw)
#define SET_SP_TAG13(sp,val) (*((short*)&(sp)->xoffset)) = LittleShort((short)val)
#define SET_SP_TAG14(sp,val) (*((short*)&(sp)->xrepeat)) = LittleShort((short)val)
#define SPRITE_TAG1(sp) (sprite[sp].hitag)
#define SPRITE_TAG2(sp) (sprite[sp].lotag)
#define SPRITE_TAG3(sp) (sprite[sp].clipdist)
#define SPRITE_TAG4(sp) (sprite[sp].ang)