42_cube3D/main.c

37 lines
1.2 KiB
C
Raw Normal View History

2023-04-26 06:55:14 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/26 12:44:55 by erey-bet #+# #+# */
2023-05-05 10:49:04 -04:00
/* Updated: 2023/05/05 14:48:45 by cchauvet ### ########.fr */
2023-04-26 06:55:14 -04:00
/* */
/* ************************************************************************** */
#include "cube3D.h"
2023-05-05 10:49:04 -04:00
#include "map/map.h"
2023-04-26 06:55:14 -04:00
int main(int argc, char **argv)
{
2023-05-05 10:49:04 -04:00
t_map map;
2023-04-26 06:55:14 -04:00
if (argc != 2)
{
2023-05-05 07:35:52 -04:00
ft_eprintf("No argument");
2023-04-26 06:55:14 -04:00
return (1);
}
2023-05-05 10:49:04 -04:00
if (map_parsing(argv[1], &map))
{
map_freer(&map);
2023-04-26 06:55:14 -04:00
return (2);
2023-05-05 10:49:04 -04:00
}
if (start_game(map))
2023-04-26 06:55:14 -04:00
{
return (3);
}
2023-05-05 10:49:04 -04:00
map_freer(&map);
2023-04-26 06:55:14 -04:00
return (0);
}