blob: f4eb4f0e82ee12b9547fc61b500079b873e43a6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <libft.h>
#include <cub3d.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
/*
** I can't close fd
*/
void
ft_parse_map(t_win *wlist, const char *map_path)
{
int fd;
fd = open(map_path, O_RDONLY);
if (fd < 0)
{
ft_dprintf(STDERR_FILENO, "Error\n");
ft_dprintf(STDERR_FILENO, "\033[31;1mNo map\033[0m\n");
ft_exit(2, wlist);
}
ft_get_res(fd, wlist);
if (ft_get_tex(fd, wlist) < 0)
return ;
}
|