-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.c
34 lines (31 loc) · 1.32 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
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yhwang <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/23 16:26:09 by yhwang #+# #+# */
/* Updated: 2023/12/22 15:23:16 by yhwang ### ########.fr */
/* */
/* ************************************************************************** */
#include "./parse/incs/miniRT_parse.h"
#include "./execute/incs/minirt.h"
int main(int argc, char **argv)
{
t_p_scene *p_scene;
t_all *all;
p_scene = parse_main(argc, argv);
if (!p_scene)
return (1);
all = NULL;
if (alloc_struct_mem(&all) == -1)
exit_prog(all, "Error\nMalloc failed");
init_vars(p_scene, all);
free_scene(p_scene, 0);
if (all->cam.direction.z != 1)
set_cam_vec(all);
start_mlx(all);
exit_prog(all, NULL);
return (0);
}