aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_hex_to_rgb.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-11 16:07:29 +0100
committerRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-11 16:07:29 +0100
commit7f77c9bc922fb608f689385d642304956afe0492 (patch)
tree50ccbb70b2f39f6dbe2d8336165eea47b6b5c048 /src/ft_hex_to_rgb.c
parentqweqwe (diff)
download42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.gz
42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.bz2
42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.xz
42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.zst
42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.zip
Performance
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)
{