diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 14:47:33 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 14:47:33 +0100 |
commit | 8866ef5699150d0549096efa94fc311ff7a48dc7 (patch) | |
tree | 4a03267f7e7f9b399a9ad0536b50ba6a90407e47 /src/ft_parse_map.c | |
parent | Music is pretty bav (diff) | |
download | 42-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 '')
-rw-r--r-- | src/ft_parse_map.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 48201fd..9b34087 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -25,13 +25,13 @@ static void size_t j; i = 0; - ml = clist->mlist; - while (ml->map[i]) + ml = clist.mlist; + while (ml.map[i]) i++; j = 0; - while (ml->map[i - 1][j]) + while (ml.map[i - 1][j]) { - if (ml->map[i - 1][j] != '1' && ml->map[i - 1][j] != '\0') + if (ml.map[i - 1][j] != '1' && ml.map[i - 1][j] != '\0') ft_map_error(FT_ERR_MAP_L_L, clist); j++; } @@ -51,7 +51,7 @@ static int8_t char **words; int ret; - clist->mlist->line_chk += 1; + clist.mlist.line_chk += 1; if ((ret = get_next_line(fd, &line)) < 0) return (ft_map_error(FT_ERR_READ, clist)); if (ret == 0) @@ -93,14 +93,14 @@ void while (ret != 12 && ret >= 0) ret = ft_parse_it(fd, clist); (ret == -2) ? (ft_map_error(FT_ERR_ALR_SET, clist)) : 0; - (ret == -1) ? (ft_map_error(clist->errmsg, clist)) : 0; + (ret == -1) ? (ft_map_error(clist.errmsg, clist)) : 0; if (ft_get_map_core(fd, clist) < 0) - ft_map_error(clist->errmsg, clist); + ft_map_error(clist.errmsg, clist); ft_check_map_last_line(clist); - ft_get_player_spawn(clist->plist, clist); - ft_get_nlvl_pos(clist->mlist); + ft_get_player_spawn(clist.plist, clist); + ft_get_nlvl_pos(clist.mlist); ft_check_missing(clist); ft_set_minimap_scale(clist); - clist->currlvl += 1; + clist.currlvl += 1; close(fd); } |