From c6f87a62b31325e91bc8c847de9b20647a9b1cd8 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 24 Feb 2020 15:39:22 +0100 Subject: Added julia fractal and mouse modify julia constant --- src/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 944d5aa..9bda98b 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/24 09:27:44 by cacharle #+# #+# */ -/* Updated: 2020/02/24 13:55:02 by cacharle ### ########.fr */ +/* Updated: 2020/02/24 15:28:40 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,15 +16,14 @@ int main(int argc, char **argv) { t_state state; - if (argc != 2) + if (argc != 2 || state_init(&state, argv[1]) < 0) { ft_putstr("mandelbrot\njulia\n"); return (0); } - if (state_init(&state, argv[1]) < 0) - return (1); mlx_hook(state.window_ptr, 17, 0, event_quit, (void*)&state); mlx_hook(state.window_ptr, 2, 2, event_keydown, (void*)&state); + mlx_hook(state.window_ptr, 6, 64, event_mouse_motion, (void*)&state); mlx_mouse_hook(state.window_ptr, event_mouse, (void*)&state); mlx_loop_hook(state.mlx_ptr, render_update, (void*)&state); mlx_loop(state.mlx_ptr); -- cgit