diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -14,6 +14,7 @@ #include <libft.h> #include <mlx.h> #include <cub3d.h> +#include <stddef.h> #include <unistd.h> int @@ -26,17 +27,8 @@ int ft_dprintf(STDERR_FILENO, "Error\n\033[1;31mNo map selected\n\033[0m"); return (1); } - if (!(clist = ft_init_cub())) - { - ft_memdel((void**)&clist); + if (ft_init_cub3d(&clist) < 0) return (2); - } - if (!(clist->wlist = ft_init_win())) - { - ft_memdel((void**)&clist->wlist); - ft_memdel((void**)&clist); - return (2); - } ft_parse_map(argv[1], clist); if (ft_init_winlx(clist) < 0) return (ft_exit(3, clist)); |