aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_floor_cast.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_floor_cast.c7
1 files changed, 4 insertions, 3 deletions
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 *