From f3ef7f448c8551df9c723d22d33a6fac0b966c22 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 30 Mar 2020 16:20:10 +0200 Subject: Fixed conditionnal jump btw --- src/ft_floor_cast.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ft_floor_cast.c') diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index 13a0b54..e80a299 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -28,10 +28,11 @@ static void static void ft_draw_extra_tex(uint8_t tid, uint16_t y, uint16_t x, t_cub *cl) { - float dist; - t_rgb rgb; + float dist; + t_rgb rgb; - if ((dist = cl->rlist.row_dist_tab[y]) <= 0) + dist = cl->rlist.row_dist_tab[y]; + if (dist <= 0) dist = 0.0001; rgb.b = (uint8_t)cl->tlist[tid].ptr[cl->rlist.fc_tex_x_tab[tid - 6][y][x] * 4 + 4 * cl->tlist[tid].img_h * -- cgit v1.2.3