-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
41 lines (38 loc) · 1.5 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
36
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zrabhi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/09 10:37:51 by zrabhi #+# #+# */
/* Updated: 2022/04/10 02:16:03 by zrabhi ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
int main(int ac, char **av)
{
t_fractol *data;
data = (t_fractol *)malloc(sizeof(t_fractol));
if (!data)
return (-1);
ft_init(data);
if (ac == 2)
{
if (ft_check(av, data) == 1)
{
mlx_key_hook(data->mlx_wind, &key_press, data);
mlx_hook(data->mlx_wind, 53, 0, &closed, data);
mlx_hook(data->mlx_wind, 4, 0, &mouse_press, data);
mlx_hook(data->mlx_wind, 6, 0, &mouse_move, data);
mlx_loop_hook(data->mlx, &hundle_no_event, data);
mlx_loop(data->mlx);
}
}
else
{
red();
ft_putstr("\n Invalid parametrs , it s seems that you need help,\
Check the make file output \n\n");
}
}