aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_map_line.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 14:47:33 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 14:47:33 +0100
commit8866ef5699150d0549096efa94fc311ff7a48dc7 (patch)
tree4a03267f7e7f9b399a9ad0536b50ba6a90407e47 /src/ft_check_map_line.c
parentMusic is pretty bav (diff)
download42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.gz
42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.bz2
42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.xz
42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.zst
42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.zip
Changing stuff
Diffstat (limited to 'src/ft_check_map_line.c')
-rw-r--r--src/ft_check_map_line.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ft_check_map_line.c b/src/ft_check_map_line.c
index 184e489..4368a18 100644
--- a/src/ft_check_map_line.c
+++ b/src/ft_check_map_line.c
@@ -20,21 +20,21 @@ static int8_t
{
if (!ft_ischarset("012NSEWL ", line[i]))
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_ILL_MAP);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_ILL_MAP);
return (-1);
}
if (ft_ischarset("NSEW", line[i]))
- clist->mlist->isspawn += 1;
- if (clist->mlist->isspawn > 1)
+ clist.mlist.isspawn += 1;
+ if (clist.mlist.isspawn > 1)
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_MULT_SPAWN);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_MULT_SPAWN);
return (-1);
}
if (line[i] == 'L')
- clist->mlist->isnlvl += 1;
- if (clist->mlist->isnlvl > 1)
+ clist.mlist.isnlvl += 1;
+ if (clist.mlist.isnlvl > 1)
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_MULT_NLVL);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_MULT_NLVL);
return (-1);
}
return (0);
@@ -45,7 +45,7 @@ static int8_t
{
if (!ft_ischarset("1 ", line[i]))
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_ILL_MAP);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_ILL_MAP);
return (-1);
}
return (0);
@@ -73,7 +73,7 @@ static int8_t
{
if (line[0] != '1' || line[i - 1] != '1')
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_ILL_ENTRY);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_ILL_ENTRY);
return (-1);
}
return (0);
@@ -100,9 +100,9 @@ int8_t
}
if (ft_check_side_walls(line, i, clist) < 0)
return (-1);
- if (ft_get_line_len(line) != clist->mlist->map_w)
+ if (ft_get_line_len(line) != clist.mlist.map_w)
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_MAP_LEN);
+ ft_sprintf(clist.errmsg, "%s", FT_ERR_MAP_LEN);
return (-1);
}
return (0);