- use symbolic constants for some statnums

This commit is contained in:
Christoph Oelckers 2020-08-06 20:08:04 +02:00
parent 4cfeb9b2cc
commit 4b69a181c3
3 changed files with 6 additions and 15 deletions

View File

@ -166,14 +166,15 @@ void animatesprites_d(int x,int y,int a,int smoothratio)
}
if( t->statnum == 99 ) continue;
if( s->statnum != 1 && s->picnum == APLAYER && ps[s->yvel].newowner == -1 && s->owner >= 0 )
if( s->statnum != STAT_ACTOR && s->picnum == APLAYER && ps[s->yvel].newowner == -1 && s->owner >= 0 )
{
t->x -= mulscale16(MaxSmoothRatio-smoothratio,ps[s->yvel].posx-ps[s->yvel].oposx);
t->y -= mulscale16(MaxSmoothRatio-smoothratio,ps[s->yvel].posy-ps[s->yvel].oposy);
t->z = ps[s->yvel].oposz + mulscale16(smoothratio,ps[s->yvel].posz-ps[s->yvel].oposz);
t->z += (40<<8);
}
else if( ( s->statnum == 0 && s->picnum != CRANEPOLE) || s->statnum == 10 || s->statnum == 6 || s->statnum == 4 || s->statnum == 5 || s->statnum == 1 )
else if( ( s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER ||
s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR )
{
t->x -= mulscale16(MaxSmoothRatio-smoothratio,s->x-hittype[i].bposx);
t->y -= mulscale16(MaxSmoothRatio-smoothratio,s->y-hittype[i].bposy);

View File

@ -153,7 +153,7 @@ void animatesprites_r(int x,int y,int a,int smoothratio)
}
if( t->statnum == 99 ) continue;
if( s->statnum != 1 && s->picnum == APLAYER && ps[s->yvel].newowner == -1 && s->owner >= 0 )
if( s->statnum != STAT_ACTOR && s->picnum == APLAYER && ps[s->yvel].newowner == -1 && s->owner >= 0 )
{
t->x -= mulscale16(MaxSmoothRatio-smoothratio,ps[s->yvel].posx-ps[s->yvel].oposx);
t->y -= mulscale16(MaxSmoothRatio-smoothratio,ps[s->yvel].posy-ps[s->yvel].oposy);
@ -162,7 +162,8 @@ void animatesprites_r(int x,int y,int a,int smoothratio)
s->xrepeat = 24;
s->yrepeat = 17;
}
else if( ( s->statnum == 0 && s->picnum != CRANEPOLE) || s->statnum == 10 || s->statnum == 6 || s->statnum == 4 || s->statnum == 5 || s->statnum == 1 )
else if ((s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER ||
s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR)
{
t->x -= mulscale16(MaxSmoothRatio-smoothratio,s->x-hittype[i].bposx);
t->y -= mulscale16(MaxSmoothRatio-smoothratio,s->y-hittype[i].bposy);

View File

@ -1,11 +0,0 @@
#pragma once
BEGIN_SW_NS
int DoBeginJump(short SpriteNum);
int DoJump(short SpriteNum);
int DoBeginFall(short SpriteNum);
int DoFall(short SpriteNum);
void KeepActorOnFloor(short SpriteNum);
int DoActorSlide(short SpriteNum);
int DoActorSectorDamage(short SpriteNum);
int DoScaleSprite(short SpriteNum);
END_SW_NS