fix: Changed return type of set_color() and converted types for colors

This commit is contained in:
Theo Champion 2025-07-22 12:12:36 +02:00
parent 4b2f671107
commit d7ca150c74
2 changed files with 20 additions and 20 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:58:19 by kcolin #+# #+# */ /* Created: 2025/07/17 14:58:19 by kcolin #+# #+# */
/* Updated: 2025/07/17 15:57:59 by kcolin ### ########.fr */ /* Updated: 2025/07/22 12:20:12 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -30,8 +30,8 @@ typedef struct s_mapdata
char *so_texture; char *so_texture;
char *we_texture; char *we_texture;
char *ea_texture; char *ea_texture;
int f_color; unsigned int f_color;
int c_color; unsigned int c_color;
int mapheight; int mapheight;
char **map; char **map;
char **mapflood; char **mapflood;

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */ /* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */
/* Updated: 2025/07/22 12:11:28 by tchampio ### ########.fr */ /* Updated: 2025/07/22 12:20:29 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -39,11 +39,11 @@ bool perform_color_checks(int *color, char *strcolor, t_mapdata *map)
return (true); return (true);
} }
unsigned long set_color(const char *s, t_mapdata *map) unsigned int set_color(const char *s, t_mapdata *map)
{ {
int i; int i;
bool isok; bool isok;
unsigned long finalcolor; unsigned int finalcolor;
char **tab; char **tab;
int rgb[100]; int rgb[100];