aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_hex_to_rgb.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)
{