diff options
Diffstat (limited to 'src/ft_init_map.c')
-rw-r--r-- | src/ft_init_map.c | 19 |
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)); } |