From 734a4b86f52a60e08728acbbb48b26bc11891b0d Mon Sep 17 00:00:00 2001 From: jaburns Date: Sun, 18 Oct 2020 16:58:18 -0600 Subject: [PATCH] Fix missing ref to absf --- src/game/platform_displacement.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/platform_displacement.c b/src/game/platform_displacement.c index c9b3f12..aba3dc5 100644 --- a/src/game/platform_displacement.c +++ b/src/game/platform_displacement.c @@ -10,6 +10,8 @@ struct SurfaceObjectTransform *gMarioPlatform = NULL; +#define absfx( x ) ( (x) < 0.0f ? -(x) : (x) ) + /** * Determine if Mario is standing on a platform object, meaning that he is * within 4 units of the floor. Set his referenced platform object accordingly. @@ -37,7 +39,7 @@ void update_mario_platform(void) { marioZ = gMarioObject->oPosZ; floorHeight = find_floor(marioX, marioY, marioZ, &floor); - if (absf(marioY - floorHeight) < 4.0f) { + if (absfx(marioY - floorHeight) < 4.0f) { awayFromFloor = 0; } else { awayFromFloor = 1;