From be92d252ff28697057587aee21821c99a9939971 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 3 Jan 2022 07:54:19 +0100 Subject: [PATCH] - fixed signedness issue with slope sprite coefficient. --- source/core/gamefuncs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/gamefuncs.h b/source/core/gamefuncs.h index b161a9f28..18051977c 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -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)