-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathso_long.c
More file actions
executable file
·30 lines (27 loc) · 1.32 KB
/
so_long.c
File metadata and controls
executable file
·30 lines (27 loc) · 1.32 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* so_long.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kalshaer <kalshaer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/22 08:09:17 by kalshaer #+# #+# */
/* Updated: 2023/03/24 17:55:50 by kalshaer ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
int main(int argc, char **argv)
{
t_mlx mlx;
if (argc == 1)
errorh("No map in arguments\n", NULL, NULL);
if (argc > 2)
errorh("only one argument is allowed\n", NULL, NULL);
mlx.map = map_check(argv[1], &(mlx.count));
create_map(&mlx);
mlx_string_put(mlx.mlx, mlx.win, 0, 10, 0x00000000, "0");
mlx_hook(mlx.win, 2, 0, &hooking_function, &mlx);
mlx_hook(mlx.win, 17, 0, &close_window, &mlx);
mlx_loop(mlx.mlx);
return (0);
}