fix error map close
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/12 12:49:16 by madumerg #+# #+# */
|
/* Created: 2024/09/12 12:49:16 by madumerg #+# #+# */
|
||||||
/* Updated: 2024/10/05 18:43:16 by madumerg ### ########.fr */
|
/* Updated: 2024/10/06 16:16:31 by madumerg ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ int space_line(char *line);
|
|||||||
|
|
||||||
//parse_utils_two.c
|
//parse_utils_two.c
|
||||||
int ft_count_line_map(char **map, int y);
|
int ft_count_line_map(char **map, int y);
|
||||||
void replace_nl(char *l);
|
int replace_nl(char *l);
|
||||||
int recup_map(char **old_map, int i, t_pars *pars);
|
int recup_map(char **old_map, int i, t_pars *pars);
|
||||||
int all_skip(char **map, t_pars *pars);
|
int all_skip(char **map, t_pars *pars);
|
||||||
|
|
||||||
|
19
map.cub
19
map.cub
@ -8,23 +8,12 @@ EA ./ea_texture.png
|
|||||||
C 255,100,200
|
C 255,100,200
|
||||||
F 50,0,250
|
F 50,0,250
|
||||||
|
|
||||||
|
11111
|
||||||
111111
|
|
||||||
1000W1
|
1000W1
|
||||||
1111111
|
111111
|
||||||
|
|
||||||
11111111111111
|
11111111111111
|
||||||
11
|
111111111111
|
||||||
11101
|
0 11101
|
||||||
1111111111111111
|
1111111111111111
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
111111111111111
|
111111111111111
|
||||||
111111111111111111111111
|
111111111111111111111111
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/04 16:58:27 by madumerg #+# #+# */
|
/* Created: 2024/09/04 16:58:27 by madumerg #+# #+# */
|
||||||
/* Updated: 2024/10/05 18:45:09 by madumerg ### ########.fr */
|
/* Updated: 2024/10/05 19:18:00 by madumerg ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/11 11:24:13 by madumerg #+# #+# */
|
/* Created: 2024/09/11 11:24:13 by madumerg #+# #+# */
|
||||||
/* Updated: 2024/10/07 11:45:16 by madumerg ### ########.fr */
|
/* Updated: 2024/10/24 14:30:13 by madumerg ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -46,6 +46,8 @@ int check_map_close(char **map)
|
|||||||
x = 0;
|
x = 0;
|
||||||
while (map[y][x])
|
while (map[y][x])
|
||||||
{
|
{
|
||||||
|
if (actual_char(map[y][0]) == 0)
|
||||||
|
return (1);
|
||||||
if (actual_char(map[y][x]) == 0 && \
|
if (actual_char(map[y][x]) == 0 && \
|
||||||
(err_not_close(map[y][x + 1], map[y][x - 1], \
|
(err_not_close(map[y][x + 1], map[y][x - 1], \
|
||||||
map[y + 1][x], map[y - 1][x]) == 1))
|
map[y + 1][x], map[y - 1][x]) == 1))
|
||||||
|
Reference in New Issue
Block a user