-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.c
More file actions
34 lines (30 loc) · 1.19 KB
/
main.c
File metadata and controls
34 lines (30 loc) · 1.19 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: TheTerror <jfaye@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/17 16:30:47 by TheTerror #+# #+# */
/* Updated: 2024/02/10 16:57:06 by TheTerror ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include "minirt.h"
int main(int argc, char **argv)
{
t_vars *v;
v = init_v();
if (!parse_args(v, argc, argv))
exitprocss(v, EXIT_FAILURE);
if (!set_mlx(v))
exitprocss(v, EXIT_FAILURE);
minirt(v);
events(v);
mlx_loop(v->xptr);
return (0);
}
void exitprocss(t_vars *v, int status)
{
free_v(v);
exit(status);
}