diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_darken_rgb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ft_darken_rgb.c b/src/ft_darken_rgb.c index 6993891..97d0c0e 100644 --- a/src/ft_darken_rgb.c +++ b/src/ft_darken_rgb.c @@ -15,15 +15,12 @@ #include <stdio.h> uint32_t - ft_darken_rgb(t_rgb rgb, t_cub *cl) + ft_darken_rgb(t_rgb rgb, int32_t y, t_cub *cl) { t_rgb darker; - float dist; - float calc; + uint8_t calc; - if ((dist = cl->rlist.ceil_dist) <= 0) - dist = 0.0001; - calc = (dist * 0.4); + calc = (((cl->wlist.y_size / 2) + y)), calc = (calc >= 255) ? (255) : (calc); calc = (calc < 1) ? (1) : (calc); darker = rgb; |