diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 14:00:59 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 14:00:59 +0100 |
commit | 1bd6b6e64b02ce70e193bb108843bc0ee5c051c3 (patch) | |
tree | 394788b4dc6f1248f44894798fc708e87f1bd8a1 /src/ft_warp_level.c | |
parent | Loaded weapon images needs to memory (diff) | |
download | 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.gz 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.bz2 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.xz 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.zst 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.zip |
Correct init and frees
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 09f0322..d6a3d7f 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -65,6 +65,18 @@ static void 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->mlist.isweapon[0] && cl->tlist[18].img) + mlx_destroy_image(cl->wlist.wlx, cl->tlist[18].img); + if (cl->mlist.isweapon[1] && 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 < 8) |