diff options
author | Rudy Bousset <rbousset@z2r6p3.le-101.fr> | 2020-03-08 20:40:40 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r6p3.le-101.fr> | 2020-03-08 20:40:40 +0100 |
commit | 843f11bd9a1d460ade2ef3b0cadc8e28f0a61247 (patch) | |
tree | b56662e66e9b378eb2b0acc6ba54fee39470c3ad /src/ft_darken_rgb.c | |
parent | Something wrong (diff) | |
download | 42-cub3d-843f11bd9a1d460ade2ef3b0cadc8e28f0a61247.tar.gz 42-cub3d-843f11bd9a1d460ade2ef3b0cadc8e28f0a61247.tar.bz2 42-cub3d-843f11bd9a1d460ade2ef3b0cadc8e28f0a61247.tar.xz 42-cub3d-843f11bd9a1d460ade2ef3b0cadc8e28f0a61247.tar.zst 42-cub3d-843f11bd9a1d460ade2ef3b0cadc8e28f0a61247.zip |
Nice and clean
Diffstat (limited to '')
-rw-r--r-- | src/ft_darken_rgb.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/ft_darken_rgb.c b/src/ft_darken_rgb.c index 434fcf8..656aac7 100644 --- a/src/ft_darken_rgb.c +++ b/src/ft_darken_rgb.c @@ -29,22 +29,18 @@ uint32_t return (ft_rgb_to_hex(darker)); } -uint32_t - ft_darken_floor(t_rgb rgb, float dist, t_cub *cl) -{ - t_rgb darker; - float calc; +/* uint32_t */ +/* ft_darken_floor(t_rgb rgb, int32_t y, t_cub *cl) */ +/* { */ +/* t_rgb darker; */ +/* float calc; */ - /* calc = ((float)(y + (75000.0 / cl->wlist.y_size)) */ - /* / (cl->wlist.y_size / 2)) - 1.0; */ - /* calc = (calc < 0) ? (0) : (calc); */ - (void)cl; - calc = (dist * 0.4); - calc = (calc >= 255) ? (255) : (calc); - calc = (calc < 1) ? (1) : (calc); - darker = rgb; - darker.r *= calc; - darker.g *= calc; - darker.b *= calc; - return (ft_rgb_to_hex(darker)); -} +/* calc = ((float)(y + (75000.0 / cl->wlist.y_size)) */ +/* / (cl->wlist.y_size / 2)) - 1.0; */ +/* calc = (calc < 0) ? (0) : (calc); */ +/* darker = rgb; */ +/* darker.r *= calc; */ +/* darker.g *= calc; */ +/* darker.b *= calc; */ +/* return (ft_rgb_to_hex(darker)); */ +/* } */ |