#include #include #include t_map *ft_init_map(void) { t_map *mlist; if (!(mlist = (t_map*)malloc(sizeof(t_map)))) return (NULL); if (!(mlist->no_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(mlist->so_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(mlist->ea_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(mlist->we_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(mlist->sprite_path = (char*)ft_calloc(1, sizeof(char))) || !(mlist->mapl = (char*)ft_calloc(1, sizeof(char))) || !(mlist->map = (char**)ft_calloc(2, sizeof(char*))) || !(mlist->map[0] = (char*)ft_calloc(1, sizeof(char)))) return (NULL); mlist->map[1] = 0; mlist->map_w = 0; mlist->map_h = 0; mlist->x_step = 0; mlist->y_step = 0; mlist->line_chk = 0; mlist->map_start = 0; mlist->isspawn = 0; mlist->scale = 0; return (mlist); }