diff options
Diffstat (limited to 'src/ft_del_extra_sprites.c')
-rw-r--r-- | src/ft_del_extra_sprites.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ft_del_extra_sprites.c b/src/ft_del_extra_sprites.c new file mode 100644 index 0000000..21df608 --- /dev/null +++ b/src/ft_del_extra_sprites.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_key_loop.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/17 20:06:26 by rbousset #+# #+# */ +/* Updated: 2020/02/17 20:06:29 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <libft.h> +#include <cub3d.h> +#include <mlx.h> +#include <stdint.h> +#include <stddef.h> + +void + ft_del_extra_sprites(t_cub *cl) +{ + uint8_t i; + + i = 1; + while ((i + 2) <= cl->mlist.topsp) + { + if (cl->tlist[i + 7].img) + mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 7].img); + i++; + } +} |