- fixed signedness issue with slope sprite coefficient.

This commit is contained in:
Christoph Oelckers 2022-01-03 07:54:19 +01:00
parent 7915fb7ef1
commit be92d252ff

View file

@ -287,7 +287,7 @@ inline int spriteGetSlope(DCoreActor* actor)
// same stuff, different flag...
inline int tspriteGetSlope(const tspritetype* spr)
{
return !(spr->clipdist & TSPR_SLOPESPRITE) ? 0 : uint8_t(spr->xoffset) + (uint8_t(spr->yoffset) << 8);
return !(spr->clipdist & TSPR_SLOPESPRITE) ? 0 : uint8_t(spr->xoffset) + (int8_t(spr->yoffset) << 8);
}
inline int32_t tspriteGetZOfSlope(const tspritetype* tspr, int dax, int day)