From: Lukas Jiriste Date: Thu, 25 Apr 2024 07:38:57 +0000 (+0200) Subject: Fix argument parsing so as not to ignore input X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=c1e14d1e2f5ea30b294a0819e6f97a2b561b0212;p=42%2Ffract-ol.git 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. --- 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;