mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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:
parent
1a2dd787f3
commit
7687440273
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue