-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdestroy_game.c
More file actions
44 lines (39 loc) · 1.32 KB
/
destroy_game.c
File metadata and controls
44 lines (39 loc) · 1.32 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* destroy_game.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bkarlida <bkarlida@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/27 17:57:36 by muerdoga #+# #+# */
/* Updated: 2023/09/02 11:42:07 by bkarlida ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
void double_free(char **game)
{
int i;
i = 0;
if (game)
{
while (game[i])
free(game[i++]);
free(game);
}
}
void free_tex_paths_2(t_cub3d *game)
{
if (game->north.path)
free(game->north.path);
if (game->south.path)
free(game->south.path);
if (game->west.path)
free(game->west.path);
if (game->east.path)
free(game->east.path);
}
void free_map(t_cub3d *game, char **map)
{
(void)map;
free_tex_paths_2(game);
}