From c1e14d1e2f5ea30b294a0819e6f97a2b561b0212 Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Thu, 25 Apr 2024 09:38:57 +0200 Subject: [PATCH] Fix argument parsing so as not to ignore input The -f option did not work, because the fractal was set to mandelbrot after the option parsing. Other options could have also been affected. --- main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 0b9c8c8..6b236f6 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/27 14:29:26 by ljiriste #+# #+# */ -/* Updated: 2024/04/18 11:49:18 by ljiriste ### ########.fr */ +/* Updated: 2024/04/25 09:36:26 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -205,12 +205,6 @@ void init_session(t_session *s) static void init_view(t_session *s) { - s->view.fractal = mandelbrot; - s->view.palette = tri_color; - s->view.pixel_size.x = 0.01; - s->view.pixel_size.y = 0.01; - s->view.color_shift = 0.7; - s->view.color_shift_speed = 0.01; s->view.window_coord.x = -s->img.width / 2 * s->view.pixel_size.x; s->view.window_coord.y = s->img.height / 2 * s->view.pixel_size.y; return ; @@ -218,6 +212,12 @@ static void init_view(t_session *s) void set_default(t_session *s) { + s->view.fractal = mandelbrot; + s->view.palette = tri_color; + s->view.pixel_size.x = 0.01; + s->view.pixel_size.y = 0.01; + s->view.color_shift = 0.7; + s->view.color_shift_speed = 0.01; s->set.man.detail = 1000; s->set.man.color_stability = 100; s->img.width = 1000; -- 2.30.2