mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
Use SDL_floor() instead of libc floor()
Now there is one less dependency on libc.
This commit is contained in:
parent
acfe4c294d
commit
0f36cdce0d
1 changed files with 1 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
||||||
#include "GraphicsUtil.h"
|
#include "GraphicsUtil.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -264,7 +263,7 @@ void BlitSurfaceTinted(
|
||||||
double temp_pixgreen = pixgreen * 0.587;
|
double temp_pixgreen = pixgreen * 0.587;
|
||||||
double temp_pixblue = pixblue * 0.114;
|
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 ctred = (ct.colour & graphics.backBuffer->format->Rmask) >> 16;
|
||||||
Uint8 ctgreen = (ct.colour & graphics.backBuffer->format->Gmask) >> 8;
|
Uint8 ctgreen = (ct.colour & graphics.backBuffer->format->Gmask) >> 8;
|
||||||
|
|
Loading…
Reference in a new issue