int ft_loop(t_all *all) { if (FN.img != NULL) mlx_destroy_image(FN.mlx, FN.img); ft_raycast(all); return (1); }
int ft_loop_hook(t_env *e) { int x; if ((x = -1) && e->img.img != NULL) { mlx_destroy_image(e->mlx, e->img.img); e->img.img = NULL; } e->img.img = mlx_new_image(e->mlx, WIN_X, WIN_Y); while (++x < WIN_X) ft_raycast(e, x); ft_getframe(e); ft_move(e); mlx_put_image_to_window(e->mlx, e->win, e->img.img, 0, 0); return (0); }