-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessages.c
36 lines (32 loc) · 1.37 KB
/
messages.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* messages.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aheinane <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/23 09:21:21 by aheinane #+# #+# */
/* Updated: 2024/10/28 11:31:27 by aheinane ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
void wrong_values_color(int j, char **colors, t_textures *text, int fd)
{
free_color(j, colors);
closing(text, fd, "Wrong values\n");
}
void failed_to_copy(t_textures *textures, int fd)
{
free(textures->line);
closing(textures, fd, "Malloc fails\n");
}
void color_out_of_range(int values_i, t_textures *text, int fd,
char ***colors)
{
if (values_i > 255 || values_i < 0)
{
free_color(0, *colors);
*colors = NULL;
closing(text, fd, "Values must be from 0 to 255\n");
}
}