-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
35 lines (32 loc) · 1.37 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
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nhamid <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/06/26 15:28:02 by nhamid #+# #+# */
/* Updated: 2019/08/08 19:18:16 by nhamid ### ########.fr */
/* */
/* ************************************************************************** */
#include "rtv1.h"
int main(int argc, char **argv)
{
t_params params;
if (argc == 2)
{
params.file = argv[1];
config_check(params.file, ¶ms);
mlx_put_image_to_window(params.mlx_ptr, params.win_ptr,
params.img_ptr, 0, 0);
mlx_hook(params.win_ptr, 2, 1, key_press, ¶ms);
mlx_hook(params.win_ptr, 17, 1, red_cross, ¶ms);
mlx_loop(params.mlx_ptr);
}
else
{
ft_putstr("Please enter the configuration file !\n");
ft_putstr("./RTv1 < Configuration File >\n");
}
return (0);
}