-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparsing_helper.c
More file actions
30 lines (28 loc) · 1.16 KB
/
parsing_helper.c
File metadata and controls
30 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parsing_helper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aylaaouf <aylaaouf@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/20 07:12:23 by aylaaouf #+# #+# */
/* Updated: 2025/03/20 07:20:14 by aylaaouf ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void helper_parsing(t_game *game, char *filename)
{
if (!check_path(filename))
{
ft_printf("Error: Invalid path.\n");
clean_game(game);
exit(0);
}
game->map = read_map(filename);
if (game->map == NULL)
{
perror("so_long");
clean_game(game);
exit(1);
}
}