aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_hex_to_rgb.c
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-03-11 18:59:58 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-03-11 18:59:58 +0100
commitb6388b5101d8187f746f91c89842e932a1d01cb6 (patch)
tree70bd9ba7012f5906db01b485ec8f58f5a4697240 /src/ft_hex_to_rgb.c
parentclose but no cigar (diff)
parentca tue (diff)
download42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.gz
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.bz2
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.xz
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.zst
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.zip
get merged
Diffstat (limited to 'src/ft_hex_to_rgb.c')
-rw-r--r--src/ft_hex_to_rgb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ft_hex_to_rgb.c b/src/ft_hex_to_rgb.c
index 30332cc..1732473 100644
--- a/src/ft_hex_to_rgb.c
+++ b/src/ft_hex_to_rgb.c
@@ -13,6 +13,17 @@
#include <cub3d.h>
#include <stdint.h>
+t_rgb
+ ft_hex_to_og_rgb(uint32_t color)
+{
+ t_rgb rgb;
+
+ rgb.r = (color >> 16) & 255;
+ rgb.g = (color >> 8) & 255;
+ rgb.b = color & 255;
+ return (rgb);
+}
+
t_bmp_rgb
ft_hex_to_rgb(uint32_t color)
{