diff options
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r-- | src/ft_parse_map.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 011dfcf..d078337 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -14,7 +14,7 @@ ft_check_cub(const char *map_path, t_win *wlist) { ft_dprintf(STDERR_FILENO, "Error\n"); ft_dprintf(STDERR_FILENO, "\033[31;1mMap is not a .cub\033[0m\n"); - ft_free_words(words); + ft_free_words(words, NULL); ft_exit(2, wlist); } i = 0; @@ -24,10 +24,10 @@ ft_check_cub(const char *map_path, t_win *wlist) { ft_dprintf(STDERR_FILENO, "Error\n"); ft_dprintf(STDERR_FILENO, "\033[31;1mMap is not a .cub\033[0m\n"); - ft_free_words(words); + ft_free_words(words, NULL); ft_exit(2, wlist); } - ft_free_words(words); + ft_free_words(words, NULL); } /* @@ -48,7 +48,14 @@ ft_parse_map(const char *map_path, t_win *wlist) ft_exit(2, wlist); } ft_get_res(fd, wlist); - if (ft_get_tex(fd, wlist) < 0 || - ft_get_sprite_tex(fd, wlist) < 0) + if (ft_get_tex(fd, wlist) < 0) return ; + ft_check_empty_line(fd, 6, wlist); + if (ft_get_sprite_tex(fd, wlist) < 0) + return ; + ft_printf("[%s]\n", wlist->clist->no_tex_path); + ft_printf("[%s]\n", wlist->clist->so_tex_path); + ft_printf("[%s]\n", wlist->clist->we_tex_path); + ft_printf("[%s]\n", wlist->clist->ea_tex_path); + ft_printf("[%s]\n", wlist->clist->sprite_path); } |