-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
32 lines (29 loc) · 1.28 KB
/
main.c
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
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bregneau <bregneau@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/13 19:32:08 by bregneau #+# #+# */
/* Updated: 2022/01/23 17:36:46 by bregneau ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/fdf.h"
int main(int ac, char **av)
{
t_data data;
if (ac == 2)
{
ft_bzero(&data, sizeof(data));
ft_init(WINDOW_WIDTH, WINDOW_HEIGHT, &data);
if (ft_parsing(av[1], &data.map) == 0)
ft_exit(&data, EXIT_FAILURE);
ft_create_map(&data.map, &data);
ft_draw_map(&data, &data.map);
mlx_loop(data.mlx_ptr);
ft_destroy(&data);
}
else
ft_putendl("Incorrect number of arguments");
}