diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 7d2f38955..b63cc5db5 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -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 diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 6bf314345..d938657da 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -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;