diff options
author | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:42:05 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:42:05 +0100 |
commit | e29dd2fa3688e1e96a25af3b651da574af08aa90 (patch) | |
tree | cb6486fc91f1b93e61e4dcda25d359095e6aa108 /src/ft_init_lists.c | |
parent | Better code structure (diff) | |
download | 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.gz 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.bz2 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.xz 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.zst 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.zip |
Splited structs
Diffstat (limited to '')
-rw-r--r-- | src/ft_init_lists.c | 19 |
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(); |