-
Notifications
You must be signed in to change notification settings - Fork 0
/
cub3d.c
32 lines (29 loc) · 1.37 KB
/
cub3d.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cub3d.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jcluzet <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/08 19:25:03 by jcluzet #+# #+# */
/* Updated: 2021/02/16 01:26:15 by jcluzet ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
int main(int argc, char **argv)
{
t_parse parsee;
t_display displayy;
initparse(&displayy);
if (argc == 1)
return
(showerror(&displayy, "No path to scene file have been provided."));
if (argc > 3)
return
(showerror(&displayy, "More than two argument have been provided."));
if (argc == 3 && cmp(argv[2], "--save", 6))
return (showerror(&displayy, "Invalid second argument"));
parse(argc, argv[1], &parsee, &displayy);
display(&parsee, &displayy);
return (EXIT_SUCCESS);
}