diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 15:25:01 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 15:25:01 +0100 |
commit | ba7cbd8dbffac2b75ccac01d628ca493426ecf70 (patch) | |
tree | f2a09778ada9033522bf36206158c6130eb85365 /src/ft_del_lists.c | |
parent | Normed so far (diff) | |
download | 42-cub3d-ba7cbd8dbffac2b75ccac01d628ca493426ecf70.tar.gz 42-cub3d-ba7cbd8dbffac2b75ccac01d628ca493426ecf70.tar.bz2 42-cub3d-ba7cbd8dbffac2b75ccac01d628ca493426ecf70.tar.xz 42-cub3d-ba7cbd8dbffac2b75ccac01d628ca493426ecf70.tar.zst 42-cub3d-ba7cbd8dbffac2b75ccac01d628ca493426ecf70.zip |
Pretty bav
Diffstat (limited to '')
-rw-r--r-- | src/ft_del_lists.c (renamed from src/ft_del_extra_sprites.c) | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/ft_del_extra_sprites.c b/src/ft_del_lists.c index 21df608..e1a5288 100644 --- a/src/ft_del_extra_sprites.c +++ b/src/ft_del_lists.c @@ -1,31 +1,43 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_key_loop.c :+: :+: :+: */ +/* ft_del_lists.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 */ +/* Created: 2020/02/14 17:28:46 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:28:46 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) + ft_del_lists(t_cub *clist) { uint8_t i; - i = 1; - while ((i + 2) <= cl->mlist.topsp) + i = 0; + while (i < 10) { - if (cl->tlist[i + 7].img) - mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 7].img); + ft_memdel((void*)&clist->sfx[i].cmd); i++; } + ft_memdel((void*)&clist->sfx[1].cmd_alt); + ft_memdel((void*)&clist->sfx[3].cmd_alt); + while (i < 8) + { + ft_memdel((void*)&clist->sprites[i]); + i++; + } + ft_memdel((void*)&clist->sprites); + i = 0; + while (i < 2) + { + ft_memdel((void*)&clist->weaps[i]); + i++; + } + ft_memdel((void*)&clist->weaps); } |