/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet map = map; data->mlx = mlx_init(); data->window = mlx_new_window(data->mlx, WINDOW_SIZE, WINDOW_SIZE, "solong"); ft_draw_map(data); mlx_key_hook(data->window, ft_key, data); mlx_loop(data->mlx); ft_freer_tab_ultimate(1, map->patern); mlx_destroy_window(data->mlx, data->window); mlx_destroy_display(data->mlx); free(data->mlx); ft_freer_ultimate(5, data->bcolor, data->pcolor, data->ccolor, data->wcolor, data->ecolor); free(data); free(map); return (0); } int main(int ac, char **av) { if (ac != 2) { ft_printf("Map error\n"); return (1); } ft_printf("Generating assets ...\n"); ft_gen_assets(); ft_printf("Generating assets [FINISHED]\n"); ft_initialised(av[1]); // mlx_destroy_window(data.mlx, data.window); // mlx_destroy_display(data.mlx); // free(data.mlx); return (1); }