diff --git a/src/render_utils.c b/src/render_utils.c index d006c6f..6db8d0a 100644 --- a/src/render_utils.c +++ b/src/render_utils.c @@ -6,7 +6,7 @@ /* By: mcolonna +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/24 14:26:22 by grobledo #+# #+# */ -/* Updated: 2024/11/13 18:31:15 by mcolonna ### ########.fr */ +/* Updated: 2024/11/18 14:33:01 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,8 +45,8 @@ void draw_vertical_line_end(t_ray *ray, int draw_start, int draw_end, int texy; const t_texture texture = g_map.textures[ray->texdir]; - ray->y = 0; - while (ray->y++ < SCREEN_HEIGHT) + ray->y = -1; + while (++ray->y < SCREEN_HEIGHT) { if (ray->y < draw_start) img_data[ray->y * SCREEN_WIDTH + ray->x] = g_map.color_ceiling;