-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.c
36 lines (33 loc) · 1.49 KB
/
errors.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
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: msoria-j <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/06 08:27:37 by msoria-j #+# #+# */
/* Updated: 2024/01/15 14:13:56 by msoria-j ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_cub_editor.h"
int err_arg_number(void)
{
ft_fprintf(2, "Usage: ./editor map_name [map_size=10]\n");
ft_fprintf(2, "Generates a square map (by default 10x10) to be used with cub3D project.\n");
ft_fprintf(2, "Recommended values range from 10 to 50.\n");
ft_fprintf(2, " map_name: Name of the file to be generated.\n");
ft_fprintf(2, " map_size: Optional. Defines the area of the map (e.g. 40x40).\n");
print_controls();
return (1);
}
int err_file(char *file)
{
printf("Could not open the file: %s\n", file);
return (1);
}
int err_mlx(t_mlx *m)
{
printf("Error on minilbx\n");
close_mlx(m);
return (1);
}