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 07:51:11 -04:00
|
|
|
/* Updated: 2023/05/05 11:47:28 by cchauvet ### ########.fr */
|
2023-04-26 06:55:14 -04:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "cube3D.h"
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
t_map *map;
|
|
|
|
|
|
|
|
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-03 10:33:57 -04:00
|
|
|
map = map_parsing(argv[1]);
|
2023-04-26 06:55:14 -04:00
|
|
|
if (!map)
|
|
|
|
return (2);
|
2023-05-05 07:51:11 -04:00
|
|
|
if (start_game(*map))
|
2023-04-26 06:55:14 -04:00
|
|
|
{
|
|
|
|
return (3);
|
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
}
|