aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-05 00:30:41 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-05 00:30:41 +0100
commitb729c722cb6fea7a88929e0054508bfa60c27ed5 (patch)
treeba6f02bee81a1cfd5144847f0f0e5e57d3332f7f /inc
parentit's all black (diff)
download42-cub3d-b729c722cb6fea7a88929e0054508bfa60c27ed5.tar.gz
42-cub3d-b729c722cb6fea7a88929e0054508bfa60c27ed5.tar.bz2
42-cub3d-b729c722cb6fea7a88929e0054508bfa60c27ed5.tar.xz
42-cub3d-b729c722cb6fea7a88929e0054508bfa60c27ed5.tar.zst
42-cub3d-b729c722cb6fea7a88929e0054508bfa60c27ed5.zip
How do I convert hex to rgb pls
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d.h2
-rw-r--r--inc/cub3d_structs.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index 732ccbe..c2e117e 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -128,6 +128,6 @@ uint8_t ft_free_words(char **words);
int8_t ft_warp_level(t_cub *cl);
int ft_exit(uint8_t exit_code, t_cub *clist);
uint32_t ft_rgb_to_hex(t_rgb rgb);
-t_rgb ft_hex_to_rgb(int32_t color);
+t_bmp_rgb ft_hex_to_rgb(uint32_t color);
# endif
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 0773e11..ab99f7b 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -54,6 +54,13 @@ typedef struct s_bmp_info
uint32_t colors_important;
} t_bmp_info;
+typedef struct s_bmp_rgb
+{
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} t_bmp_rgb;
+
# pragma pack(pop)
typedef struct s_img