-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.c
More file actions
35 lines (31 loc) · 1.26 KB
/
main.c
File metadata and controls
35 lines (31 loc) · 1.26 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
31
32
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nnuno-ca <nnuno-ca@student.42porto.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/18 23:48:42 by nnuno-ca #+# #+# */
/* Updated: 2023/02/08 23:50:17 by nnuno-ca ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
static void args_check(int argc, char **argv)
{
if (argc != 2)
panic(NULL, INVALID_NBR_ARGS);
if (*argv[1] == '\0')
panic(NULL, NULL_MAP);
}
int main(int argc, char **argv)
{
t_game game;
args_check(argc, argv);
game = init_game();
get_map(argv[1], &game);
map_check(&game);
init_mlx(&game);
render_map(&game);
hook_n_run(&game);
return (EXIT_SUCCESS);
}