From 1bd6b6e64b02ce70e193bb108843bc0ee5c051c3 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 19 Mar 2020 14:00:59 +0100 Subject: Correct init and frees --- src/ft_init_map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ft_init_map.c') diff --git a/src/ft_init_map.c b/src/ft_init_map.c index 37fc858..f740fd8 100644 --- a/src/ft_init_map.c +++ b/src/ft_init_map.c @@ -57,6 +57,7 @@ static int8_t int8_t ft_init_map_norme(t_map *mlist) { + mlist->darklvl = 0; mlist->scale = 0; mlist->nlx = 0; mlist->nly = 0; @@ -65,6 +66,9 @@ int8_t ft_bzero(mlist->sprite_nbr, 4096); ft_bzero(mlist->sprite_order, 4096); ft_bzero(mlist->traps_order, 512); + ft_bzero(mlist->heals_order, 64); + ft_bzero(mlist->weaps_nbr, 2); + ft_bzero(mlist->weaps_order, 2); return (0); } @@ -91,8 +95,9 @@ int8_t mlist->isskybox = 0; mlist->istraps = 0; mlist->isheals = 0; + mlist->isweapon[0] = 0; + mlist->isweapon[1] = 0; mlist->traps_nbr = 0; mlist->heals_nbr = 0; - mlist->darklvl = 0; return (ft_init_map_norme(mlist)); } -- cgit v1.2.3