From 0f36cdce0d252790ce524b25ab5da87e75369ed5 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 5 Mar 2021 20:46:19 -0800 Subject: [PATCH] Use SDL_floor() instead of libc floor() Now there is one less dependency on libc. --- desktop_version/src/GraphicsUtil.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp index 9c5e6149..e2f3d201 100644 --- a/desktop_version/src/GraphicsUtil.cpp +++ b/desktop_version/src/GraphicsUtil.cpp @@ -1,6 +1,5 @@ #include "GraphicsUtil.h" -#include #include #include #include @@ -264,7 +263,7 @@ void BlitSurfaceTinted( double temp_pixgreen = pixgreen * 0.587; double temp_pixblue = pixblue * 0.114; - double gray = floor((temp_pixred + temp_pixgreen + temp_pixblue + 0.5)); + double gray = SDL_floor((temp_pixred + temp_pixgreen + temp_pixblue + 0.5)); Uint8 ctred = (ct.colour & graphics.backBuffer->format->Rmask) >> 16; Uint8 ctgreen = (ct.colour & graphics.backBuffer->format->Gmask) >> 8;