From 741b1534f4cebc94c74d7861e6b963391bdaf44c Mon Sep 17 00:00:00 2001 From: Nicolas VIENOT Date: Sat, 16 Mar 2019 18:33:22 +0100 Subject: [PATCH] ok norme --- Makefile | 9 +-- includes/fractol.h | 63 ++++++++++---------- libft/Makefile | 12 ++-- libft/ft_atoi.c | 2 +- libft/ft_putstr.c | 2 +- libft/ft_strdup.c | 2 +- libft/ft_toupper.c | 2 +- srcs/ft_calc.c | 23 +++++--- srcs/ft_deal_key.c | 4 +- srcs/ft_deal_mouse.c | 27 ++++++--- srcs/ft_print.c | 90 +++++++++-------------------- srcs/ft_start.c | 10 ++-- srcs/{ft_error.c => ft_utilities.c} | 42 +++++++++++++- srcs/main.c | 4 +- 14 files changed, 154 insertions(+), 138 deletions(-) rename srcs/{ft_error.c => ft_utilities.c} (61%) diff --git a/Makefile b/Makefile index 1113a15..52d1802 100644 --- a/Makefile +++ b/Makefile @@ -6,15 +6,16 @@ # By: nvienot +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2018/12/14 15:52:13 by nvienot #+# #+# # -# Updated: 2019/03/15 12:45:35 by nvienot ### ########.fr # +# Updated: 2019/03/16 18:18:24 by nvienot ### ########.fr # # # # **************************************************************************** # NAME = fractol -SRCS = srcs/main.c srcs/ft_error.c srcs/ft_print.c srcs/ft_start.c \ +SRCS = srcs/main.c srcs/ft_start.c srcs/ft_multithreading.c \ + srcs/ft_create.c srcs/ft_utilities.c srcs/ft_calc.c \ srcs/ft_vignettes.c srcs/ft_deal_key.c srcs/ft_deal_mouse.c \ - srcs/ft_create.c srcs/ft_calc.c srcs/ft_multithreading.c + srcs/ft_print.c CC = gcc @@ -91,4 +92,4 @@ recl : all clean norm : fclean echo "$(_RED)Starting norminette...$(_END)" - norminette $(SRCS) $(INCL) | grep -B 1 '^Error' 2> /dev/null && echo "$(_RED)Norme KO :(" || echo "$(_GREEN)Norme OK ! :)$(_END)"; + norminette $(SRCS) $(INCL) | grep -B 1 '^Error' 2> /dev/null && echo "$(_RED)Norm KO :(" || echo "$(_GREEN)Norm OK ! :)$(_END)"; diff --git a/includes/fractol.h b/includes/fractol.h index fff2dc2..1c7600d 100644 --- a/includes/fractol.h +++ b/includes/fractol.h @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/01/16 11:41:57 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:27:08 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:19:44 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -163,18 +163,19 @@ struct s_win }; /* -** ft_error.c +** ft_calc.c */ -void ft_usage(void); -int ft_exit(t_win *win); +void ft_calc(t_render *r, int fract, int it_max, double pow); /* -** ft_deal_mouse.c +** ft_create.c */ -int deal_motion(int x, int y, t_win *win); -int deal_mouse(int mouse, int x, int y, t_win *win); +void *ft_create_mandelbrot(void *thrds); +void *ft_create_julia(void *thrds); +void ft_create_vig(t_win *win, int test); +void ft_create_all(t_win *win); /* ** ft_deal_key.c @@ -183,59 +184,53 @@ int deal_mouse(int mouse, int x, int y, t_win *win); int deal_key(int key, t_win *win); /* -** ft_print.c +** ft_deal_mouse.c */ -void ft_print_menu(t_win *w); -void mlx_put_pixel_to_image(t_img img, int x, int y, int a); -void ft_viseur(t_win *win); +int deal_motion(int x, int y, t_win *win); +int deal_mouse(int mouse, int x, int y, t_win *win); /* -** ft_init_struct.c +** ft_multithreading.c */ -void ft_init_start(t_win *win); -void ft_init_mandelbrot(t_win *win); -void ft_init_julia(t_win *win); +void *ft_vig(void *thrds); +void ft_multithreading(t_win *win); +void ft_multithreading_vig(t_win *win); /* -** ft_select_fractales.c +** ft_print.c */ -void ft_select_fractale(t_win *win, char *str); -void ft_reset_fractale(t_win *win); -void ft_multithreading(t_win *win); -void ft_multithreading_vig(t_win *win); +void ft_print_menu(t_win *w); /* -** ft_vignettes.c +** ft_start.c */ -void ft_create_vig(t_win *win, int test); +void ft_init_julia(t_win *win); +void ft_init_mandelbrot(t_win *win); +void ft_init_start(t_win *win); +void ft_reset_fractal(t_win *win); +void ft_select_fractal(t_win *win, char *str); /* -** ft_create.c +** ft_utilities.c */ -void ft_create_all(t_win *win); -void *ft_create_mandelbrot(void *thrds); -void *ft_create_julia(void *thrds); +void ft_usage(void); +int ft_exit(t_win *win); +void ft_viseur(t_win *win); +void mlx_put_pixel_to_image(t_img img, int x, int y, int a); /* -** ft_fractales_vig.c +** ft_vignettes.c */ -void *ft_vig(void *thrds); void ft_create_mandelbrot_vig(t_thrd *thrd); void ft_create_duobrot_vig(t_thrd *thrd); void ft_create_tricorn_vig(t_thrd *thrd); void ft_create_julia_vig(t_thrd *thrd); void ft_create_andy_vig(t_thrd *thrd); -/* -** ft_calc.c -*/ - -void ft_calc(t_render *r, int fract, int it_max, double pow); - #endif diff --git a/libft/Makefile b/libft/Makefile index 03076e6..c68f762 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -6,7 +6,7 @@ # By: nvienot +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2018/11/09 14:10:45 by nvienot #+# #+# # -# Updated: 2019/03/16 01:40:48 by nvienot ### ########.fr # +# Updated: 2019/03/16 17:21:07 by nvienot ### ########.fr # # # # **************************************************************************** # @@ -32,12 +32,14 @@ ft_getfirstdecimal.c ft_strjoinnfree.c OBJS = $(SRCS:.c=.o) +.SILENT : + all: $(NAME) -$(NAME): libft.h - @$(CC) $(FLAGS) -c $(SRCS) - @ar rc $(NAME) $(OBJS) - @ranlib $(NAME) +$(NAME): $(OBJS) libft.h + $(CC) $(FLAGS) -c $(SRCS) + ar rc $(NAME) $(OBJS) + ranlib $(NAME) clean: @/bin/rm -f $(OBJS) diff --git a/libft/ft_atoi.c b/libft/ft_atoi.c index 1c6149d..f272bfb 100644 --- a/libft/ft_atoi.c +++ b/libft/ft_atoi.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/11/12 17:35:00 by nvienot #+# #+# */ -/* Updated: 2018/11/21 21:24:18 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 17:19:23 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libft/ft_putstr.c b/libft/ft_putstr.c index ec32085..660207b 100644 --- a/libft/ft_putstr.c +++ b/libft/ft_putstr.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/11/09 17:43:45 by nvienot #+# #+# */ -/* Updated: 2018/11/21 19:22:54 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 17:19:32 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libft/ft_strdup.c b/libft/ft_strdup.c index c314038..a1cb94b 100644 --- a/libft/ft_strdup.c +++ b/libft/ft_strdup.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/11/12 17:39:58 by nvienot #+# #+# */ -/* Updated: 2018/11/21 19:45:02 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 17:21:25 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libft/ft_toupper.c b/libft/ft_toupper.c index 0596d7b..754d4e0 100644 --- a/libft/ft_toupper.c +++ b/libft/ft_toupper.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/11/15 21:33:45 by nvienot #+# #+# */ -/* Updated: 2018/11/15 21:59:07 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 17:20:28 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/ft_calc.c b/srcs/ft_calc.c index 15ffab0..f5cba59 100644 --- a/srcs/ft_calc.c +++ b/srcs/ft_calc.c @@ -6,12 +6,24 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/13 21:07:55 by nvienot #+# #+# */ -/* Updated: 2019/03/16 04:08:04 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:02:49 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ #include "fractol.h" +static void ft_modif_julia(t_render *r, int fract) +{ + if (fract == 8 || fract == 12) + { + if (fract == 8) + r->rc = r->rc + 0.155; + if (fract == 12) + r->rc = r->rc + 0.253; + r->ic = r->ic + 0.013; + } +} + static void ft_calc_3(t_render *r, int fract, int it_max, double y) { double x; @@ -93,15 +105,8 @@ void ft_calc(t_render *r, int fract, int it_max, double p) y = 0; r->a = 0; - if (fract == 8 || fract == 12) - { - if (fract == 8) - r->rc = r->rc + 0.155; - if (fract == 12) - r->rc = r->rc + 0.253; - r->ic = r->ic + 0.013; - } y = r->iz * r->iz; + ft_modif_julia(r, fract); if (fract == 1 || fract == 2 || fract == 7 || fract == 8) ft_calc_1(r, fract, it_max, y); else if (fract == 3 || fract == 4 || fract == 9 || fract == 10) diff --git a/srcs/ft_deal_key.c b/srcs/ft_deal_key.c index 52f1bf1..cdcd2b7 100644 --- a/srcs/ft_deal_key.c +++ b/srcs/ft_deal_key.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/11 18:39:39 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:21:03 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:32:24 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,7 @@ static void deal_key_reset(int key, t_win *win) (win->fract == 12) ? (win->fract = 1) : (win->fract += 1); else if (key == TOUCH_LESS) (win->fract == 1) ? (win->fract = 12) : (win->fract -= 1); - ft_reset_fractale(win); + ft_reset_fractal(win); } static void deal_key_2(int key, t_win *win) diff --git a/srcs/ft_deal_mouse.c b/srcs/ft_deal_mouse.c index 462bb2c..98222a4 100644 --- a/srcs/ft_deal_mouse.c +++ b/srcs/ft_deal_mouse.c @@ -6,13 +6,27 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/11 18:40:43 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:38:00 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:19:44 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ #include "fractol.h" -static void ft_pick_fractale(int x, int y, t_win *win) +static void ft_immersive(t_win *win, int test) +{ + if (test == 1) + { + if (win->immersive == 1 && win->p.it_max > 2) + win->p.it_max -= 1; + } + else if (test == 2) + { + if (win->immersive == 1) + win->p.it_max += 1; + } +} + +static void ft_pick_fractal(int x, int y, t_win *win) { if (x > WIN_HOR_SIZE - VIG_HOR_SIZE - MRG && x < WIN_HOR_SIZE - MRG) { @@ -49,8 +63,8 @@ static void deal_mouse_click(t_win *win, int x, int y) if (x > WIN_HOR_SIZE - VIG_HOR_SIZE - MRG && x < WIN_HOR_SIZE \ - MRG && y > MRG && y < (MRG + VIG_VER_SIZE * 5)) { - ft_pick_fractale(x, y, win); - ft_reset_fractale(win); + ft_pick_fractal(x, y, win); + ft_reset_fractal(win); } else if (win->fract > 6) (win->motion == 0) ? (win->motion += 1) : (win->motion = 0); @@ -70,15 +84,14 @@ int deal_mouse(int mouse, int x, int y, t_win *win) win->p.zoom /= (double)COEF_ZOOM; win->p.x1 = oldx - (double)x / win->p.zoom; win->p.y1 = oldy - (double)y / win->p.zoom; - if (win->immersive == 1 && win->p.it_max > 2) - win->p.it_max -= 1; + ft_immersive(win, 1); } else if (mouse == 5) { win->p.zoom *= (double)COEF_ZOOM; win->p.x1 = oldx - (double)x / win->p.zoom; win->p.y1 = oldy - (double)y / win->p.zoom; - (win->immersive == 1) ? win->p.it_max += 1 : 0; + ft_immersive(win, 2); } (mouse == 1) ? deal_mouse_click(win, x, y) : 0; } diff --git a/srcs/ft_print.c b/srcs/ft_print.c index 02e0483..1f19c69 100644 --- a/srcs/ft_print.c +++ b/srcs/ft_print.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/01/22 21:29:22 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:34:45 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:18:42 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,6 +30,31 @@ static void ft_get_pow(t_win *win) free(y); } +static void ft_print_menu_2(t_win *win) +{ + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 85, \ + GREY, "Move : Arrow keys"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 105, GREY, "Zoom : Scroll"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 125, \ + GREY, "Change fractal : +/-"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 145, \ + GREY, "Change iterations : Page-up/Page-down"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 165, \ + GREY, "Change power : 0.1 = | 1 = [/]"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 185, \ + GREY, "Change color variation : C"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 205, \ + GREY, "Change color palette : X"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 225, \ + GREY, "Activate motion mode : M/Click"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 245, \ + GREY, "Activate sample mode : V"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 265, \ + GREY, "Activate immersive mode : X"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 285, GREY, "Reset : R"); + mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 305, GREY, "Quit : Esc"); +} + static void ft_print_menu_1(t_win *win) { if (win->fract == 1) @@ -58,34 +83,9 @@ static void ft_print_menu_1(t_win *win) mlx_string_put(win->mlx_ptr, win->win_ptr, 120, 5, GREY, F12); } -static void ft_print_menu_2(t_win *win) -{ - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 85, \ - GREY, "Move : Arrow keys"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 105, GREY, "Zoom : Scroll"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 125, \ - GREY, "Change fractale : +/-"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 145, \ - GREY, "Change iterations : Page-up/Page-down"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 165, \ - GREY, "Change power : 0.1 = | 1 = [/]"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 185, \ - GREY, "Change color variation : C"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 205, \ - GREY, "Change color palette : X"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 225, \ - GREY, "Activate motion mode : M/Click"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 245, \ - GREY, "Activate sample mode : V"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 265, \ - GREY, "Activate immersive mode : X"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 285, GREY, "Reset : R"); - mlx_string_put(win->mlx_ptr, win->win_ptr, 10, 305, GREY, "Quit : Esc"); -} - void ft_print_menu(t_win *w) { - mlx_string_put(w->mlx_ptr, w->win_ptr, 10, 5, GREY, "Fractale | "); + mlx_string_put(w->mlx_ptr, w->win_ptr, 10, 5, GREY, "Fractal | "); mlx_string_put(w->mlx_ptr, w->win_ptr, 10, 25, GREY, "Iterations |"); mlx_string_put(w->mlx_ptr, w->win_ptr, 10, 45, GREY, "Power (Multi) |"); ft_print_menu_1(w); @@ -110,39 +110,3 @@ void ft_print_menu(t_win *w) if (w->menu == 1) ft_print_menu_2(w); } - -void mlx_put_pixel_to_image(t_img img, int x, int y, int a) -{ - int octet; - - octet = img.bpp / 8; - if (x >= 0 && y >= 0 && x < IMG_HOR_SIZE && y < IMG_VER_SIZE) - { - if (!(ft_memcpy(&img.data[octet * x + img.sizeline * y], \ - &a, octet))) - return ; - } -} - -void ft_viseur(t_win *win) -{ - int x; - int y; - int color; - - x = (WIN_HOR_SIZE / 2) + 2; - y = (WIN_VER_SIZE / 2) - 1 - 8; - color = WHITE; - while (y <= (WIN_VER_SIZE / 2) - 1 + 8) - { - mlx_put_pixel_to_image(win->img, x, y, color); - y++; - } - y = (WIN_VER_SIZE / 2) - 1; - x = (WIN_HOR_SIZE / 2) + 2 - 8; - while (x <= (WIN_HOR_SIZE / 2) + 2 + 8) - { - mlx_put_pixel_to_image(win->img, x, y, color); - x++; - } -} diff --git a/srcs/ft_start.c b/srcs/ft_start.c index bfbadda..226be62 100644 --- a/srcs/ft_start.c +++ b/srcs/ft_start.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/05 20:49:19 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:26:56 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:27:02 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -43,10 +43,10 @@ void ft_init_start(t_win *win) win->motion = 0; win->vig_it = 0; win->immersive = 0; - win->p.color = 999; + win->p.color = 500; } -void ft_reset_fractale(t_win *win) +void ft_reset_fractal(t_win *win) { if (win->fract <= 6) ft_init_mandelbrot(win); @@ -62,7 +62,7 @@ void ft_reset_fractale(t_win *win) ft_create_vig(win, 1); } -void ft_select_fractale(t_win *win, char *str) +void ft_select_fractal(t_win *win, char *str) { if (!ft_strcmp(str, F1)) win->fract = 1; @@ -88,5 +88,5 @@ void ft_select_fractale(t_win *win, char *str) win->fract = 11; else if (!ft_strcmp(str, F12)) win->fract = 12; - ft_reset_fractale(win); + ft_reset_fractal(win); } diff --git a/srcs/ft_error.c b/srcs/ft_utilities.c similarity index 61% rename from srcs/ft_error.c rename to srcs/ft_utilities.c index e4465af..7fb7535 100644 --- a/srcs/ft_error.c +++ b/srcs/ft_utilities.c @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_error.c :+: :+: :+: */ +/* ft_utilities.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/01/22 11:48:56 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:28:56 by nvienot ### ########.fr */ +/* Created: 2019/03/16 17:45:48 by nvienot #+# #+# */ +/* Updated: 2019/03/16 17:57:55 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,3 +30,39 @@ int ft_exit(t_win *win) mlx_destroy_window(win->mlx_ptr, win->win_ptr); exit(EXIT_SUCCESS); } + +void ft_viseur(t_win *win) +{ + int x; + int y; + int color; + + x = (WIN_HOR_SIZE / 2) + 2; + y = (WIN_VER_SIZE / 2) - 1 - 8; + color = WHITE; + while (y <= (WIN_VER_SIZE / 2) - 1 + 8) + { + mlx_put_pixel_to_image(win->img, x, y, color); + y++; + } + y = (WIN_VER_SIZE / 2) - 1; + x = (WIN_HOR_SIZE / 2) + 2 - 8; + while (x <= (WIN_HOR_SIZE / 2) + 2 + 8) + { + mlx_put_pixel_to_image(win->img, x, y, color); + x++; + } +} + +void mlx_put_pixel_to_image(t_img img, int x, int y, int a) +{ + int octet; + + octet = img.bpp / 8; + if (x >= 0 && y >= 0 && x < IMG_HOR_SIZE && y < IMG_VER_SIZE) + { + if (!(ft_memcpy(&img.data[octet * x + img.sizeline * y], \ + &a, octet))) + return ; + } +} diff --git a/srcs/main.c b/srcs/main.c index 153cc0a..f4940e8 100644 --- a/srcs/main.c +++ b/srcs/main.c @@ -6,7 +6,7 @@ /* By: nvienot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/01/14 17:01:18 by nvienot #+# #+# */ -/* Updated: 2019/03/16 03:25:24 by nvienot ### ########.fr */ +/* Updated: 2019/03/16 18:19:44 by nvienot ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,7 +45,7 @@ int main(int ac, char **av) || !ft_strcmp(av[1], F11) || !ft_strcmp(av[1], F12)) { ft_init_start(&win); - ft_select_fractale(&win, av[1]); + ft_select_fractal(&win, av[1]); ft_multithreading(&win); ft_hook(&win); }