aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_rgb_to_hex.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 17:26:10 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 17:26:10 +0100
commit08dce587032f08c5bfbc2790bdb2d668ca1990c1 (patch)
treea927bf674dfa6d1d3efd03ef06dfacb115ae238f /src/ft_rgb_to_hex.c
parentmap fix (diff)
download42-cub3d-08dce587032f08c5bfbc2790bdb2d668ca1990c1.tar.gz
42-cub3d-08dce587032f08c5bfbc2790bdb2d668ca1990c1.tar.bz2
42-cub3d-08dce587032f08c5bfbc2790bdb2d668ca1990c1.tar.xz
42-cub3d-08dce587032f08c5bfbc2790bdb2d668ca1990c1.tar.zst
42-cub3d-08dce587032f08c5bfbc2790bdb2d668ca1990c1.zip
int16_tamer
Diffstat (limited to 'src/ft_rgb_to_hex.c')
-rw-r--r--src/ft_rgb_to_hex.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/ft_rgb_to_hex.c b/src/ft_rgb_to_hex.c
index 525296d..4a7ad8e 100644
--- a/src/ft_rgb_to_hex.c
+++ b/src/ft_rgb_to_hex.c
@@ -1,9 +1,23 @@
+/* ************************************************************************** */
+/* LE - / */
+/* / */
+/* ft_rgb_to_hex.c .:: .:/ . .:: */
+/* +:+:+ +: +: +:+:+ */
+/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */
+/* #+# #+ #+ #+# */
+/* Created: 2020/02/05 16:07:13 by rbousset #+# ## ## #+# */
+/* Updated: 2020/02/05 16:07:14 by rbousset ### #+. /#+ ###.fr */
+/* / */
+/* / */
+/* ************************************************************************** */
+
#include <cub3d.h>
+#include <stdint.h>
-int
+uint32_t
ft_rgb_to_hex(t_rgb rgb)
{
- int res;
+ uint32_t res;
res = 0;
res += ((rgb.r << 16) + (rgb.g << 8) + rgb.b);