aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-20 16:51:31 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-20 16:51:31 +0100
commitd99126692d9eefd345b4756017f4b7fb9cd75ba7 (patch)
tree61f72fda5b99804dea1ef0ca0f7ddc6e4ec6200b /src/ft_exit.c
parentAdded number images (diff)
download42-cub3d-d99126692d9eefd345b4756017f4b7fb9cd75ba7.tar.gz
42-cub3d-d99126692d9eefd345b4756017f4b7fb9cd75ba7.tar.bz2
42-cub3d-d99126692d9eefd345b4756017f4b7fb9cd75ba7.tar.xz
42-cub3d-d99126692d9eefd345b4756017f4b7fb9cd75ba7.tar.zst
42-cub3d-d99126692d9eefd345b4756017f4b7fb9cd75ba7.zip
in progress
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index f753f84..b9e68d0 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -80,6 +80,8 @@ static void
static void
ft_del_tex(t_cub *clist)
{
+ int8_t i;
+
if (clist->tlist[0].img)
mlx_destroy_image(clist->wlist.wlx, clist->tlist[0].img);
if (clist->tlist[1].img)
@@ -102,6 +104,10 @@ static void
mlx_destroy_image(clist->wlist.wlx, clist->tlist[16].img);
if (clist->mlist.isheals && clist->tlist[17].img)
mlx_destroy_image(clist->wlist.wlx, clist->tlist[17].img);
+ i = -1;
+ while (++i < 11)
+ if (clist->tnum[i].img)
+ mlx_destroy_image(clist->wlist.wlx, clist->tnum[i].img);
ft_del_extra_sprites(clist);
}