diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 14:00:59 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 14:00:59 +0100 |
commit | 1bd6b6e64b02ce70e193bb108843bc0ee5c051c3 (patch) | |
tree | 394788b4dc6f1248f44894798fc708e87f1bd8a1 /src/ft_init_map.c | |
parent | Loaded weapon images needs to memory (diff) | |
download | 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.gz 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.bz2 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.xz 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.zst 42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.zip |
Correct init and frees
Diffstat (limited to 'src/ft_init_map.c')
-rw-r--r-- | src/ft_init_map.c | 7 |
1 files changed, 6 insertions, 1 deletions
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)); } |