42_cube3D/main.c

34 lines
1.1 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 #+# #+# */
/* Updated: 2023/05/19 17:03:29 by erey-bet ### ########.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);
}
if (map_parsing(argv[1], &map)
|| start_game(map))
2023-05-05 10:49:04 -04:00
{
map_freer(&map);
2023-04-26 06:55:14 -04:00
return (2);
2023-05-05 10:49:04 -04:00
}
map_freer(&map);
2023-04-26 06:55:14 -04:00
return (0);
}