fix: render(): remove black line on top of image

This commit is contained in:
mcolonna 2024-11-18 14:33:48 +01:00
parent 51d20f95d9
commit d4c0e5faf9

View file

@ -6,7 +6,7 @@
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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;