diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-02 18:26:58 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-02 18:26:58 +0100 |
commit | d943dbac7fc0d4908ebc5dfc85ad477bc776402a (patch) | |
tree | f7e79a41ffe61370afa70e7e8425451b228cf490 | |
parent | Header norme (diff) | |
download | 42-cub3d-d943dbac7fc0d4908ebc5dfc85ad477bc776402a.tar.gz 42-cub3d-d943dbac7fc0d4908ebc5dfc85ad477bc776402a.tar.bz2 42-cub3d-d943dbac7fc0d4908ebc5dfc85ad477bc776402a.tar.xz 42-cub3d-d943dbac7fc0d4908ebc5dfc85ad477bc776402a.tar.zst 42-cub3d-d943dbac7fc0d4908ebc5dfc85ad477bc776402a.zip |
Changed variable name
-rw-r--r-- | inc/cub3d.h | 2 | ||||
-rw-r--r-- | src/ft_check_map_line.c | 4 | ||||
-rw-r--r-- | src/ft_init_lists.c | 2 | ||||
-rw-r--r-- | src/ft_parse_map.c | 1 |
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); |