From ba7cbd8dbffac2b75ccac01d628ca493426ecf70 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 22 Mar 2020 15:25:01 +0100 Subject: Pretty bav --- src/ft_warp_level.c | 54 +---------------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) (limited to 'src/ft_warp_level.c') diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 2eb165e..8fb5415 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -20,27 +20,6 @@ #include #include -static void - ft_del_map(t_map *ml) -{ - ft_memdel((void*)&ml->filename); - ft_memdel((void*)&ml->no_tex_path); - ft_memdel((void*)&ml->so_tex_path); - ft_memdel((void*)&ml->ea_tex_path); - ft_memdel((void*)&ml->we_tex_path); - ft_memdel((void*)&ml->nl_tex_path); - ft_memdel((void*)&ml->fl_tex_path); - ft_memdel((void*)&ml->ce_tex_path); - ft_memdel((void*)&ml->nlevel_path); - ft_memdel((void*)&ml->skybox_path); - ft_memdel((void*)&ml->traps_path); - ft_memdel((void*)&ml->music_path); - ft_memdel((void*)&ml->music_cmd); - ft_memdel((void*)&ml->mapl); - ft_free_sprites(ml->sprite_path); - ft_free_words(ml->map); -} - static void ft_player_keepings(t_cub *cl) { @@ -69,38 +48,7 @@ static void cl->f_rgb = ft_init_rgb(); cl->c_rgb = ft_init_rgb(); cl->rlist = ft_init_s_ray(); - i = -1; - while (++i < 5) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[i].img); - if (cl->mlist.isnlvl && cl->tlist[5].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[5].img); - if (cl->mlist.isftex && cl->tlist[6].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[6].img); - if (cl->mlist.isctex && cl->tlist[7].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[7].img); - if (cl->mlist.istraps && cl->tlist[15].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[15].img); - if (cl->tlist[16].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[16].img); - if (cl->mlist.isheals && cl->tlist[17].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[17].img); - if (cl->tlist[18].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[18].img); - if (cl->tlist[19].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[19].img); - if (cl->tweap[0].img) - mlx_destroy_image(cl->wlist.wlx, cl->tweap[0].img); - if (cl->tweap[1].img) - mlx_destroy_image(cl->wlist.wlx, cl->tweap[1].img); - if (cl->tweap[2].img) - mlx_destroy_image(cl->wlist.wlx, cl->tweap[2].img); - if (cl->tweap[3].img) - mlx_destroy_image(cl->wlist.wlx, cl->tweap[3].img); - ft_del_extra_sprites(cl); - i = -1; - while (++i < 11) - if (cl->tnum[i].img) - mlx_destroy_image(cl->wlist.wlx, cl->tnum[i].img); + ft_del_tex(cl); i = -1; while (++i < 8) ft_memdel((void*)&cl->sprites[i]); -- cgit v1.2.3