aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inc/cub3d.h2
-rw-r--r--src/ft_check_map_line.c4
-rw-r--r--src/ft_init_lists.c2
-rw-r--r--src/ft_parse_map.c1
4 files changed, 4 insertions, 5 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index 7c512b8..2fd6396 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -55,7 +55,7 @@ typedef struct s_cub
char **map;
size_t map_w;
size_t line_chk;
- uint8_t nsew;
+ uint8_t isspawn;
struct s_win *wlist;
} t_cub;
diff --git a/src/ft_check_map_line.c b/src/ft_check_map_line.c
index 5ca8bcf..13baaef 100644
--- a/src/ft_check_map_line.c
+++ b/src/ft_check_map_line.c
@@ -45,8 +45,8 @@ int8_t
if (!ft_ischarset("012NSEW ", line[i]))
return (-1);
if (ft_ischarset("NSEW", line[i]))
- clist->nsew += 1;
- if (clist->nsew > 1)
+ clist->isspawn += 1;
+ if (clist->isspawn > 1)
return (-1);
}
else
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index 02ca36c..f81e256 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -54,6 +54,6 @@ t_cub
clist->c_color = -1;
clist->map_w = 0;
clist->line_chk = 0;
- clist->nsew = 0;
+ clist->isspawn = 0;
return (clist);
}
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index eb69e28..41cab3d 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -113,7 +113,6 @@ void
ret = ft_parse_it(fd, clist);
if (ret == -1)
ft_map_error(clist);
- clist->nsew = 0;
if (ft_get_map_core(fd, clist) < 0)
ft_map_error(clist);
ft_check_map_last_line(clist);