aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_init_lists.c')
-rw-r--r--src/ft_init_lists.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index d56f40c..6754923 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -72,25 +72,10 @@ static t_cub
if (!(clist = (t_cub*)malloc(sizeof(t_cub))))
return (NULL);
- if (!(clist->no_tex_path = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->so_tex_path = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->ea_tex_path = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->we_tex_path = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->sprite_path = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->mapl = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->map = (char**)ft_calloc(2, sizeof(char*))) ||
- !(clist->map[0] = (char*)ft_calloc(1, sizeof(char))) ||
- !(clist->plist = ft_init_player()))
+ if (!(clist->plist = ft_init_player()) ||
+ !(clist->mlist = ft_init_map()))
return (NULL);
- clist->map[1] = 0;
- clist->map_w = 0;
- clist->map_h = 0;
- clist->x_step = 0;
- clist->y_step = 0;
- clist->line_chk = 0;
- clist->map_start = 0;
clist->minimap = 0;
- clist->isspawn = 0;
clist->f_rgb = ft_init_rgb();
clist->c_rgb = ft_init_rgb();
clist->rlist = ft_init_s_ray();