diff options
author | Rudy Bousset <rbousset@z1r3p1.le-101.fr> | 2020-03-05 20:58:15 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z1r3p1.le-101.fr> | 2020-03-05 20:58:15 +0100 |
commit | c7b399f143c5df061860c2d2b45d6855b2c12db3 (patch) | |
tree | ce23620bb886058521f1d2736d655194d4884c5e /src/ft_darken_rgb.c | |
parent | how (diff) | |
download | 42-cub3d-c7b399f143c5df061860c2d2b45d6855b2c12db3.tar.gz 42-cub3d-c7b399f143c5df061860c2d2b45d6855b2c12db3.tar.bz2 42-cub3d-c7b399f143c5df061860c2d2b45d6855b2c12db3.tar.xz 42-cub3d-c7b399f143c5df061860c2d2b45d6855b2c12db3.tar.zst 42-cub3d-c7b399f143c5df061860c2d2b45d6855b2c12db3.zip |
cool cool
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; |