-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
33 lines (29 loc) · 1.19 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
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: junyojeo <junyojeo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/04 19:04:01 by junyojeo #+# #+# */
/* Updated: 2023/05/19 02:12:35 by junyojeo ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void fdf(char **argv)
{
t_mlx mlx;
init(&mlx, argv[1]);
parse(&mlx.map, argv[1]);
draw(&mlx);
ft_hook(&mlx);
mlx_key_hook(mlx.win, my_key_hook, &mlx);
mlx_loop(mlx.mlx);
}
int main(int argc, char **argv)
{
if (argc != 2)
ft_puterror("Usage: ./fdf [filename.fdf]\n");
fdf(argv);
return (0);
}