diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:20:10 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:20:10 +0200 |
commit | f3ef7f448c8551df9c723d22d33a6fac0b966c22 (patch) | |
tree | 982d3e931f77d30a2cc7c2d28ea6129c5f7467ca /src/ft_floor_cast.c | |
parent | Less fat sprites (diff) | |
download | 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.gz 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.bz2 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.xz 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.zst 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.zip |
Fixed conditionnal jump btw
Diffstat (limited to 'src/ft_floor_cast.c')
-rw-r--r-- | src/ft_floor_cast.c | 7 |
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 * |