- SW: Replace use of pushmove_old() inline wrapper with pushmove() and remove inline wrappers.

This commit is contained in:
Mitch Richters 2021-10-30 22:03:08 +11:00 committed by Christoph Oelckers
parent bdbe57a6b6
commit add3481e40
2 changed files with 3 additions and 21 deletions

View file

@ -627,23 +627,6 @@ static inline int64_t compat_maybe_truncate_to_int32(int64_t val)
return enginecompatibility_mode != ENGINECOMPATIBILITY_NONE ? (int32_t)val : val;
}
static inline int32_t pushmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t walldist,
int32_t ceildist, int32_t flordist, uint32_t cliptype) ATTRIBUTE((nonnull(1,2,3,4)));
static inline int32_t pushmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t walldist,
int32_t ceildist, int32_t flordist, uint32_t cliptype)
{
vec3_t vector = { *x, *y, *z };
int32_t result = pushmove(&vector, sectnum, walldist, ceildist, flordist, cliptype);
*x = vector.x;
*y = vector.y;
*z = vector.z;
return result;
}
static inline void getzrange_old(int32_t x, int32_t y, int32_t z, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(5,6,7,8)));

View file

@ -6957,11 +6957,10 @@ int pushmove_sprite(short SpriteNum)
SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum].Data();
short sectnum, ret;
int daz;
daz = sp->z - u->zclip;
sp->z -= u->zclip;
sectnum = sp->sectnum;
ret = pushmove_old(&sp->x, &sp->y, &daz, &sectnum,
ret = pushmove(&sp->pos, &sectnum,
(((int)sp->clipdist)<<2)-GETZRANGE_CLIP_ADJ, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR);
if (sectnum != sp->sectnum && sectnum >= 0)
@ -6973,7 +6972,7 @@ int pushmove_sprite(short SpriteNum)
MONO_PRINT(ds);
}
sp->z = daz + u->zclip;
sp->z += u->zclip;
return 0;
}