diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/24 09:27:44 by cacharle #+# #+# */ -/* Updated: 2020/02/24 09:33:03 by cacharle ### ########.fr */ +/* Updated: 2020/02/24 10:17:11 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,18 @@ int main(int argc, char **argv) { - ft_putendl("hello"); + t_state state; + + if (argc != 2) + { + 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_loop_hook(state.mlx_ptr, render_update, (void*)&state); + mlx_loop(state.mlx_ptr); return (0); } |
