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

Use SDL_abs() instead of libc abs() in ApplyFilter()

Always good to use the SDL stdlib where possible.
This commit is contained in:
Misa 2020-11-07 16:23:48 -08:00 committed by Ethan Lee
parent 1a2dd787f3
commit 7687440273

View file

@ -382,8 +382,8 @@ SDL_Surface* ApplyFilter( SDL_Surface* _src )
blue = static_cast<Uint8>(blue / 1.2f);
}
int distX = static_cast<int>((abs (160.0f -x ) / 160.0f) *16);
int distY = static_cast<int>((abs (120.0f -y ) / 120.0f)*32);
int distX = static_cast<int>((SDL_abs (160.0f -x ) / 160.0f) *16);
int distY = static_cast<int>((SDL_abs (120.0f -y ) / 120.0f)*32);
red = std::max(red - ( distX +distY), 0);
green = std::max(green - ( distX +distY), 0);