-
Notifications
You must be signed in to change notification settings - Fork 0
/
so_long.c
37 lines (34 loc) · 1.29 KB
/
so_long.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
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* so_long.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wboutzou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/25 19:14:08 by wboutzou #+# #+# */
/* Updated: 2022/06/25 21:15:54 by wboutzou ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
int main(int argc, char **argv)
{
int fd;
int i;
t_game game;
i = 0;
fd = checkarg(argc, argv[1]);
if (fd == 0)
return (0);
matrix(fd, &game);
if (game.map == NULL || !checker_map(&game))
{
ft_printf("Error\n");
return (0);
}
window(&game);
mlx_key_hook (game.mlx_win, key_hook, &game);
mlx_hook(game.mlx_win, 17, 0, key_hook, &game);
render(&game);
mlx_loop(game.mlx);
return (0);
}