- inlined GetSpriteSizeY in the only place where it was used.

This commit is contained in:
Christoph Oelckers 2022-08-31 00:50:37 +02:00
parent 9717082759
commit bb8c12efb4
2 changed files with 2 additions and 6 deletions

View file

@ -273,7 +273,8 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, int viewz, int camang)
if ((tsp->yrepeat >> 2) > 4)
{
yrepeat = (tsp->yrepeat >> 2) - (GetSpriteSizeY(tsp) / 64) * 2;
int sizey = MulScale(tileHeight(tsp->picnum), tsp->yrepeat, 6);
yrepeat = (tsp->yrepeat >> 2) - (sizey / 64) * 2;
xrepeat = tsp->xrepeat;
}
else

View file

@ -233,11 +233,6 @@ inline void DISTANCE(const DVector2& p1, const DVector2& p2, int& dist, int& tx,
dist = tx + ty - (tmin >> 1);
}
inline int GetSpriteSizeY(const spritetypebase* sp)
{
return MulScale(tileHeight(sp->picnum), sp->yrepeat, 6);
}
inline int GetSpriteSizeZ(const spritetypebase* sp)
{
return (tileHeight(sp->picnum) * sp->yrepeat) << 2;