fix: Decreased the number of barricades

This commit is contained in:
Theo Champion 2025-09-22 17:22:02 +02:00
parent c146fc1731
commit d34d4404e0
6 changed files with 14 additions and 18 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/31 13:17:39 by kcolin #+# #+# */
/* Updated: 2025/09/10 15:03:17 by tchampio ### ########.fr */
/* Updated: 2025/09/22 17:17:54 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -49,8 +49,6 @@ t_img_data *get_right_barricade(t_cub3d_data *data, char c)
return (data->barricades_texture[4]);
if (c == '7')
return (data->barricades_texture[5]);
if (c == '8')
return (data->barricades_texture[6]);
return (data->so_texture);
}
@ -65,7 +63,7 @@ static int get_color(t_cub3d_data *data, t_ray *ray, int tex_y)
|| (ray->side == SOUTH && ray->dir_y > 0))
tex_x = TEXTURE_SIZE - tex_x - 1;
dir = get_cardinal(ray);
if (ft_strchr("2345678", data->map->map[ray->map_y][ray->map_x]))
if (ft_strchr("234567", data->map->map[ray->map_y][ray->map_x]))
return (my_mlx_pixel_get(get_right_barricade(data,
data->map->map[ray->map_y][ray->map_x]), tex_x, tex_y));
if (dir == NORTH)