diff options
Diffstat (limited to 'src/ft_floor_cast.c')
-rw-r--r-- | src/ft_floor_cast.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index 160a2c1..9166147 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -16,8 +16,11 @@ static void ft_draw_plain_horizontal(t_rgb rgb, t_cub *cl, int32_t y, int32_t x) { + float dist; + + dist = (cl->rlist.row_dist > 0) ? (cl->rlist.row_dist) : (0.0001); *(int*)(cl->img.ptr + - (x * 4 + (y * cl->img.sizeline))) = ft_darken(rgb, cl); + (x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(dist, rgb, cl); } static void |