From ff1301afc3808887b4cf8fde9a4d24638120c6c5 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Mon, 9 Mar 2020 17:16:31 +0100 Subject: Perf --- src/ft_draw_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ft_draw_textures.c') diff --git a/src/ft_draw_textures.c b/src/ft_draw_textures.c index e19d014..5fc3bdd 100644 --- a/src/ft_draw_textures.c +++ b/src/ft_draw_textures.c @@ -29,7 +29,7 @@ void ft_draw_texture(t_cub *cl, int x, int y, int tex_y) if ((dist = cl->rlist.wall_dist) <= 0) dist = 0.0001; - calc = (dist * 0.4); + calc = (dist * 0.1 * cl->mlist.darklvl); calc = (calc >= 255) ? (255) : (calc); calc = (calc < 1) ? (1) : (calc); cl->img.ptr[x * 4 + (cl->img.sizeline * y)] = -- cgit v1.2.3