diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 20:09:07 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 20:09:07 +0100 |
commit | 2cf0485db50f566354cdfdef20214b2c0a4e1dca (patch) | |
tree | 21285f994ff8ab2b68cd5834191224c519a63767 /src/main.c | |
parent | map update (diff) | |
download | 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.gz 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.bz2 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.xz 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.zst 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.zip |
Clean norme
Diffstat (limited to 'src/main.c')
-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)); |