aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-29 17:38:46 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-29 17:38:46 +0200
commita07392fc219afc45000201d2f495694ad9b82763 (patch)
tree0eb3f2b9003ad7ceae4692242e46de56e55053b0 /src/ft_init_map.c
parentRemoved skybox shit (diff)
parentNorm (diff)
download42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.gz
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.bz2
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.xz
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.tar.zst
42-cub3d-a07392fc219afc45000201d2f495694ad9b82763.zip
Merge branch 'fix-details'
Diffstat (limited to 'src/ft_init_map.c')
-rw-r--r--src/ft_init_map.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ft_init_map.c b/src/ft_init_map.c
index e0c232c..4d3cc08 100644
--- a/src/ft_init_map.c
+++ b/src/ft_init_map.c
@@ -56,22 +56,19 @@ static int8_t
int8_t
ft_init_map_norme(t_map *mlist)
{
+ int8_t i;
+
mlist->darklvl = 0;
mlist->scale = 0;
mlist->nlx = 0;
mlist->nly = 0;
mlist->sprite_var = 0;
- mlist->weapon_var = 0;
mlist->topsp = 0;
- ft_bzero(mlist->sprite_nbr, 4096);
- ft_bzero(mlist->sprite_order, 4096);
- ft_bzero(mlist->st_o, 4096);
- ft_bzero(mlist->traps_order, 512);
- ft_bzero(mlist->heals_order, 64);
- mlist->weaps_nbr[0] = 0;
- mlist->weaps_nbr[1] = 0;
- mlist->weaps_nbr[2] = 0;
- ft_bzero(mlist->weaps_order, 1);
+ ft_bzero(mlist->sprite_nbr, FT_TOTAL_SPRT * sizeof(int16_t));
+ i = -1;
+ while (++i < FT_TOTAL_SPRT)
+ ft_bzero(mlist->sprite_order[i], 4096);
+ ft_bzero(mlist->st_o, FT_TOTAL_SPRT + 1);
return (0);
}
@@ -97,7 +94,5 @@ int8_t
mlist->ismusic = 0;
mlist->istraps = 0;
mlist->isheals = 0;
- mlist->traps_nbr = 0;
- mlist->heals_nbr = 0;
return (ft_init_map_norme(mlist));
}