aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-27 13:55:24 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-27 13:55:24 +0100
commitb626f171f26f709b27e790911b48f7a4272dc707 (patch)
treede04209c5ffecc5f26baac853951bc1748c925d4 /src/ft_init_map.c
parentReady to try traps (diff)
download42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.gz
42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.bz2
42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.xz
42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.zst
42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.zip
In progress
Diffstat (limited to '')
-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));
}