aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 16:58:33 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 16:58:33 +0100
commit3cee9c83e6d2aabf07b0957a549c07c237b6394c (patch)
treeed52f884cc19e79bcdcd78f148d6b203c59c6be3 /src
parentsfx: good (diff)
download42-cub3d-3cee9c83e6d2aabf07b0957a549c07c237b6394c.tar.gz
42-cub3d-3cee9c83e6d2aabf07b0957a549c07c237b6394c.tar.bz2
42-cub3d-3cee9c83e6d2aabf07b0957a549c07c237b6394c.tar.xz
42-cub3d-3cee9c83e6d2aabf07b0957a549c07c237b6394c.tar.zst
42-cub3d-3cee9c83e6d2aabf07b0957a549c07c237b6394c.zip
Great
Diffstat (limited to '')
-rw-r--r--src/ft_get_map.c11
-rw-r--r--src/ft_init_map.c1
2 files changed, 4 insertions, 8 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
index bbe9a7f..4cb4941 100644
--- a/src/ft_get_map.c
+++ b/src/ft_get_map.c
@@ -17,7 +17,7 @@
#include <stdint.h>
static void
- ft_linecpy(char *line, char *mapl, size_t start, t_cub *clist)
+ ft_linecpy(char *line, char *mapl, size_t start)
{
size_t i;
size_t j;
@@ -28,12 +28,7 @@ static void
slen = ft_strlen(line);
while (i < slen && line[i])
{
- if (line[i] == '!' && clist->plist.has_weapon[0])
- mapl[j] = '0';
- else if (line[i] == '@' && clist->plist.has_weapon[1])
- mapl[j] = '0';
- else
- mapl[j] = line[i];
+ mapl[j] = line[i];
i++;
j++;
}
@@ -52,7 +47,7 @@ static int8_t
return (-1);
}
ft_linecpy(line, clist->mlist.mapl,
- clist->mlist.mapl_len, clist);
+ clist->mlist.mapl_len);
clist->mlist.mapl_len += ft_strlen(line) + 1;
return (0);
}
diff --git a/src/ft_init_map.c b/src/ft_init_map.c
index 1b55d17..9ddbb47 100644
--- a/src/ft_init_map.c
+++ b/src/ft_init_map.c
@@ -70,6 +70,7 @@ int8_t
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);
return (0);
}