diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_check_map_line.c | 4 | ||||
-rw-r--r-- | src/ft_check_map_surrounds.c | 2 | ||||
-rw-r--r-- | src/ft_get_player_spawn.c | 2 | ||||
-rw-r--r-- | src/ft_parse_map.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_check_map_line.c b/src/ft_check_map_line.c index 213d75c..7fa68b7 100644 --- a/src/ft_check_map_line.c +++ b/src/ft_check_map_line.c @@ -18,12 +18,12 @@ static int8_t ft_first_checks(char *line, size_t i, t_cub *clist) { - if (!ft_ischarset("012NSEWLD ", line[i])) + if (!ft_ischarset(FT_CHRST_MAP_ENTRY, line[i])) { ft_sprintf(clist->errmsg, FT_ERR_ILL_MAP); return (-1); } - if (ft_ischarset("NSEW", line[i])) + if (ft_ischarset(FT_CHRST_SPAWN, line[i])) clist->mlist.isspawn += 1; if (clist->mlist.isspawn > 1) { diff --git a/src/ft_check_map_surrounds.c b/src/ft_check_map_surrounds.c index 07c9540..8122cc3 100644 --- a/src/ft_check_map_surrounds.c +++ b/src/ft_check_map_surrounds.c @@ -42,7 +42,7 @@ void { while (ml->map[y][x]) { - if (ft_ischarset("02NESWLD", ml->map[y][x])) + if (ft_ischarset(FT_CHRST_MAP_NON_WALL, ml->map[y][x])) { if (ft_wall_check(y, x, ml->map) < 0) ft_map_error(FT_ERR_MAP_WALLS, cl); diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c index fabcba8..c506775 100644 --- a/src/ft_get_player_spawn.c +++ b/src/ft_get_player_spawn.c @@ -75,7 +75,7 @@ void { while (clist->mlist.map[y][x]) { - if (ft_ischarset("NSEW", clist->mlist.map[y][x])) + if (ft_ischarset(FT_CHRST_SPAWN, clist->mlist.map[y][x])) { plist->pos_x = x + 0.5; plist->pos_y = y + 0.5; diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 38ce686..8878719 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -65,7 +65,7 @@ static int8_t } if (ft_ischarset("1 ", line[0])) return ((ft_get_map_first_line(line, clist) < 0) ? (-1) : (12)); - if (!ft_ischarset("RNSEWFCLMD", line[0]) + if (!ft_ischarset(FT_CHRST_VALID_PARSE, line[0]) || !(words = ft_split(line, ' '))) return (ft_error_here(FT_ERR_ILL_ENTRY, line, clist)); if ((ret = ft_select_get(words, clist)) == 12) |