From 5cc9774873b4b3d95c8e429b92b6efe10fc23636 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 30 Sep 2022 12:12:37 +1000 Subject: [PATCH] - Apply same signedness fix from `- fixed signedness issue with slope sprite coefficient.` to `spriteGetSlope()`. --- 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 7a110c66c..da6d39497 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -368,7 +368,7 @@ inline void spriteSetSlope(DCoreActor* actor, int heinum) inline int spriteGetSlope(DCoreActor* actor) { - return ((actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLOPE) ? 0 : uint8_t(actor->spr.xoffset) + (uint8_t(actor->spr.yoffset) << 8); + return ((actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLOPE) ? 0 : uint8_t(actor->spr.xoffset) + (int8_t(actor->spr.yoffset) << 8); } // same stuff, different flag...