Use engine's cstat defines

# Conflicts:
#	source/blood/src/mapedit.cpp
This commit is contained in:
nukeykt 2019-07-14 21:40:26 +09:00 committed by Christoph Oelckers
parent 9c5cbd6308
commit ce43103ae9
5 changed files with 14 additions and 36 deletions

View file

@ -2542,8 +2542,8 @@ void actInit(void)
case 80: // Random ammo
// Make sprites invisible and non-blocking
pSprite->cstat &= ~kSprBlock;
pSprite->cstat |= kSprInvisible;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
if (pSprite->extra > 0 && xsprite[pSprite->extra].state == 1)
trTriggerSprite(nSprite, &xsprite[pSprite->extra], COMMAND_ID_0);
@ -3073,7 +3073,7 @@ void actKillDude(int a1, spritetype *pSprite, DAMAGE_TYPE a3, int a4)
sfxPlayGDXGenDudeSound(pSprite, 10, pXSprite->data3);
spritetype* pEffect = gFX.fxSpawn((FX_ID)52, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, pSprite->ang);
if (pEffect != NULL) {
pEffect->cstat = kSprFace;
pEffect->cstat = CSTAT_SPRITE_ALIGNMENT_FACING;
pEffect->pal = 6;
pEffect->xrepeat = pSprite->xrepeat;
pEffect->yrepeat = pSprite->yrepeat;

View file

@ -1762,7 +1762,7 @@ void aiInitSprite(spritetype *pSprite)
case 224:
case 225:
case 226:
if ((pSprite->cstat & kSprFlipY) != 0) {
if ((pSprite->cstat & CSTAT_SPRITE_YFLIP) != 0) {
if (!(pSprite->hitag & kHitagExtBit)) // don't add autoaim for player if hitag 1 specified in editor.
pSprite->hitag = kHitagAutoAim;
break;

View file

@ -1111,7 +1111,7 @@ void removeLeech(spritetype* pLeech, bool delSprite) {
if (pLeech != NULL) {
spritetype* pEffect = gFX.fxSpawn((FX_ID)52,pLeech->sectnum,pLeech->x,pLeech->y,pLeech->z,pLeech->ang);
if (pEffect != NULL) {
pEffect->cstat = kSprFace;
pEffect->cstat = CSTAT_SPRITE_ALIGNMENT_FLOOR;
pEffect->pal = 6;
int repeat = 64 + Random(50);
pEffect->xrepeat = repeat;
@ -1259,7 +1259,7 @@ bool doExplosion(spritetype* pSprite, int nType) {
pExplosion->yrepeat = pExpl->at0;
pExplosion->xrepeat = pExpl->at0;
pExplosion->lotag = nType;
pExplosion->cstat |= kSprInvisible | kSprOriginAlign;
pExplosion->cstat |= CSTAT_SPRITE_INVISIBLE | CSTAT_SPRITE_YCENTER;
pExplosion->owner = pSprite->xvel;
if (pExplosion->extra >= 0) {

View file

@ -120,28 +120,6 @@ void QuitGame(void);
#define kMarkerLowGoo 14
#define kMarkerPath 15
// sprite cstat
#define kSprBlock 0x0001
#define kSprTrans 0x0002
#define kSprFlipX 0x0004
#define kSprFlipY 0x0008
#define kSprFace 0x0000
#define kSprWall 0x0010
#define kSprFloor 0x0020
#define kSprSpin 0x0030
#define kSprRMask 0x0030
#define kSprOneSided 0x0040
#define kSprOriginAlign 0x0080
#define kSprHitscan 0x0100
#define kSprTransR 0x0200
#define kSprPushable 0x1000
#define kSprMoveMask 0x6000
#define kSprMoveNone 0x0000
#define kSprMoveForward 0x2000
#define kSprMoveFloor 0x2000
#define kSprMoveReverse 0x4000
#define kSprMoveCeiling 0x4000
#define kSprInvisible 0x8000
// sprite attributes
#define kHitagMovePhys 0x0001 // affected by movement physics

View file

@ -2979,7 +2979,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
sprite[nDest].xrepeat = 4;
sprite[nDest].yrepeat = 4;
sprite[nDest].cstat |= kSprInvisible;
sprite[nDest].cstat |= CSTAT_SPRITE_INVISIBLE;
}
else {
@ -3139,7 +3139,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
sprite[nDest].hitag = pXSource->data3;
if (valueIsBetween(pXSource->data4, -1, 65535)) {
pXSource->data4 |= kSprOriginAlign;
pXSource->data4 |= CSTAT_SPRITE_YCENTER;
sprite[nDest].cstat = pXSource->data4;
}
break;
@ -3850,8 +3850,8 @@ void InitGenerator(int nSprite)
{
// By NoOne: intialize GDX generators
case kGDXDudeTargetChanger:
pSprite->cstat &= ~kSprBlock;
pSprite->cstat |= kSprInvisible;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
if (pXSprite->busyTime <= 0) pXSprite->busyTime = 5;
if (pXSprite->state != pXSprite->restState)
evPost(nSprite, 3, 0, COMMAND_ID_21);
@ -3859,14 +3859,14 @@ void InitGenerator(int nSprite)
case kGDXObjDataAccumulator:
case kGDXSeqSpawner:
case kGDXEffectSpawner:
pSprite->cstat &= ~kSprBlock;
pSprite->cstat |= kSprInvisible;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
if (pXSprite->state != pXSprite->restState)
evPost(nSprite, 3, 0, COMMAND_ID_21);
return;
case 700:
pSprite->cstat &= ~kSprBlock;
pSprite->cstat |= kSprInvisible;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
break;
}
if (pXSprite->state != pXSprite->restState && pXSprite->busyTime > 0)