You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/21 19:22:50 by narnaud #+# #+# */
3 years ago
/* Updated: 2022/05/23 09:54:53 by narnaud ### ########.fr */
/* */
/* ************************************************************************** */
3 years ago
#include "../includes/cub3d.h"
3 years ago
t_map parse_map(char *map_filename)
{
3 years ago
static t_map ret;
int fd;
char *file_line;
3 years ago
fd = open(map_filename, O_RDONLY);
file_line = get_next_line(fd);
3 years ago
while (file_line)
{
ret.deep++;
printf("%s", file_line);
free(file_line);
file_line = get_next_line(fd);
}
return (ret);
}
int main(int argc, char **argv)
{
3 years ago
t_map map;
3 years ago
(void)argc;
map = parse_map(argv[1]);
return (EXIT_SUCCESS);
}