-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.c
34 lines (30 loc) · 1.2 KB
/
utils.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fatkeski <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/19 18:43:11 by fatkeski #+# #+# */
/* Updated: 2025/02/21 21:28:22 by fatkeski ### ########.fr */
/* */
/* ************************************************************************** */
#include "./includes/cub3d.h"
void print_error_message(char *message)
{
printf("Error\n");
printf("%s", message);
printf("\n");
exit(1);
}
int close_game(t_game *game)
{
exit_game(game, NULL);
exit(0);
}
void exit_game(t_game *game, char *message)
{
free_game_struct(game);
if (message)
print_error_message(message);
}