aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_init_map.c')
-rw-r--r--src/ft_init_map.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ft_init_map.c b/src/ft_init_map.c
index f2f2d94..e85c6a6 100644
--- a/src/ft_init_map.c
+++ b/src/ft_init_map.c
@@ -57,6 +57,8 @@ static int8_t
int8_t
ft_init_map_norme(t_map *mlist)
{
+ int8_t i;
+
mlist->darklvl = 0;
mlist->scale = 0;
mlist->nlx = 0;
@@ -64,10 +66,12 @@ int8_t
mlist->sprite_var = 0;
mlist->weapon_var = 0;
mlist->topsp = 0;
- ft_bzero(mlist->sprite_nbr, 8);
- ft_bzero(mlist->sprite_order, 8);
- ft_bzero(mlist->st_o, 8);
- ft_bzero(mlist->traps_order, 512);
+ ft_bzero(mlist->sprite_nbr, FT_TOTAL_SPRT);
+ ft_bzero(mlist->sprite_order, FT_TOTAL_SPRT);
+ i = -1;
+ while (++i < FT_TOTAL_SPRT)
+ ft_bzero(mlist->sprite_order[i], 4096);
+ ft_bzero(mlist->st_o, FT_TOTAL_SPRT);
ft_bzero(mlist->heals_order, 64);
mlist->weaps_nbr[0] = 0;
mlist->weaps_nbr[1] = 0;
@@ -99,7 +103,6 @@ int8_t
mlist->isskybox = 0;
mlist->istraps = 0;
mlist->isheals = 0;
- mlist->traps_nbr = 0;
mlist->heals_nbr = 0;
return (ft_init_map_norme(mlist));
}