1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Use SDL_floor() instead of libc floor()

Now there is one less dependency on libc.
This commit is contained in:
Misa 2021-03-05 20:46:19 -08:00 committed by Ethan Lee
parent acfe4c294d
commit 0f36cdce0d

View file

@ -1,6 +1,5 @@
#include "GraphicsUtil.h"
#include <math.h>
#include <SDL.h>
#include <stddef.h>
#include <stdlib.h>
@ -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;