/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: joelecle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:29:00 by joelecle #+# #+# */ /* Updated: 2020/02/14 17:29:08 by joelecle ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include #include int main(int argc, const char *argv[]) { t_cub *clist; if (ft_check_map_arg(argc, argv) == FT_RET_BAD_ARGV) return (FT_RET_BAD_ARGV); if (!(clist = (t_cub*)malloc(sizeof(t_cub)))) return (FT_RET_ALLOC_ERR); if (ft_init_cub3d(clist) < 0) return (FT_RET_FAILED_STRUCTS); ft_parse_map(argv[1], clist); if (ft_init_sfx(clist) < 0) return (FT_RET_ALLOC_ERR); if (ft_init_winlx(clist) < 0) return (ft_exit(FT_RET_FAILED_MLX, clist)); ft_use_args(argc, argv, clist); return (FT_RET_FINE); }