diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:20:10 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:20:10 +0200 |
commit | f3ef7f448c8551df9c723d22d33a6fac0b966c22 (patch) | |
tree | 982d3e931f77d30a2cc7c2d28ea6129c5f7467ca /src/ft_del_tex.c | |
parent | Less fat sprites (diff) | |
download | 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.gz 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.bz2 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.xz 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.tar.zst 42-cub3d-f3ef7f448c8551df9c723d22d33a6fac0b966c22.zip |
Fixed conditionnal jump btw
Diffstat (limited to 'src/ft_del_tex.c')
-rw-r--r-- | src/ft_del_tex.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ft_del_tex.c b/src/ft_del_tex.c index fc0cf99..5e53366 100644 --- a/src/ft_del_tex.c +++ b/src/ft_del_tex.c @@ -20,7 +20,7 @@ static void uint8_t i; i = 1; - while ((i + 2) <= cl->mlist.topsp) + while (cl->mlist.sprite_path[i][0]) { if (cl->tlist[i + 7].img) mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 7].img); @@ -54,6 +54,13 @@ static void mlx_destroy_image(cl->wlist.wlx, cl->tweap[i].img); i++; } + i = 23; + while (i < 27) + { + if (cl->tlist[i].img) + mlx_destroy_image(cl->wlist.wlx, cl->tlist[i].img); + i++; + } } static void |