aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_darken_rgb.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 18:04:38 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 18:04:38 +0100
commit50759fcc4f3b939ad35254ce220c206056f3f31e (patch)
treefd28f91d64ccefe142927eeaf9dc85e5719c3666 /src/ft_darken_rgb.c
parentGood tweak (diff)
download42-cub3d-50759fcc4f3b939ad35254ce220c206056f3f31e.tar.gz
42-cub3d-50759fcc4f3b939ad35254ce220c206056f3f31e.tar.bz2
42-cub3d-50759fcc4f3b939ad35254ce220c206056f3f31e.tar.xz
42-cub3d-50759fcc4f3b939ad35254ce220c206056f3f31e.tar.zst
42-cub3d-50759fcc4f3b939ad35254ce220c206056f3f31e.zip
Fixed
Diffstat (limited to 'src/ft_darken_rgb.c')
-rw-r--r--src/ft_darken_rgb.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/ft_darken_rgb.c b/src/ft_darken_rgb.c
deleted file mode 100644
index 223a540..0000000
--- a/src/ft_darken_rgb.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* ft_darken_rgb.c :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/03/05 16:04:28 by rbousset #+# #+# */
-/* Updated: 2020/03/05 16:04:29 by rbousset ### ########lyon.fr */
-/* */
-/* ************************************************************************** */
-
-#include <cub3d.h>
-#include <stdint.h>
-
-uint32_t
- ft_darken(t_rgb rgb, t_cub *cl)
-{
- t_rgb darker;
- float calc;
- float dist;
-
- if ((dist = cl->rlist.row_dist) <= 0)
- dist = 0.0001;
- calc = (dist * 0.1 * cl->mlist.darklvl);
- 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));
-}