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-04-26 09:45:21 -04:00
|
|
|
/* Updated: 2023/04/26 15:20:32 by erey-bet ### ########.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-04-26 09:45:21 -04:00
|
|
|
printf("No argument");
|
2023-04-26 06:55:14 -04:00
|
|
|
return (1);
|
|
|
|
}
|
2023-04-26 08:58:24 -04:00
|
|
|
/*map = map_parsing(argv[1]);
|
2023-04-26 06:55:14 -04:00
|
|
|
if (!map)
|
|
|
|
{
|
|
|
|
return (2);
|
2023-04-26 08:58:24 -04:00
|
|
|
}*/
|
|
|
|
(void)argv;
|
|
|
|
map = malloc(sizeof(t_map));
|
2023-04-26 09:45:21 -04:00
|
|
|
map->map = malloc(sizeof(char *) * 5);
|
2023-04-26 08:58:24 -04:00
|
|
|
map->map[0] = "11111";
|
|
|
|
map->map[1] = "10001";
|
|
|
|
map->map[2] = "10S01";
|
|
|
|
map->map[3] = "10101";
|
|
|
|
map->map[4] = "11111";
|
|
|
|
map->size_x = 5;
|
|
|
|
map->size_y = 5;
|
2023-04-26 06:55:14 -04:00
|
|
|
if (start_game(map))
|
|
|
|
{
|
|
|
|
return (3);
|
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
}
|