diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_hex_to_rgb.c | 6 | ||||
-rw-r--r-- | src/ft_save_to_bmp.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ft_hex_to_rgb.c b/src/ft_hex_to_rgb.c index 03e9643..81c474e 100644 --- a/src/ft_hex_to_rgb.c +++ b/src/ft_hex_to_rgb.c @@ -13,10 +13,10 @@ #include <cub3d.h> #include <stdint.h> -t_rgb - ft_hex_to_rgb(int32_t color) +t_bmp_rgb + ft_hex_to_rgb(uint32_t color) { - t_rgb rgb; + t_bmp_rgb rgb; rgb.r = ((color >> 16) & 0xff) / 255.0; rgb.g = ((color >> 8) & 0xff) / 255.0; diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c index bc4547a..9526e62 100644 --- a/src/ft_save_to_bmp.c +++ b/src/ft_save_to_bmp.c @@ -47,7 +47,7 @@ static uint8_t *ft_convert_image_to_bmp(t_img img, t_cub *cl) { uint8_t *bmp; - t_rgb px; + t_bmp_rgb px; uint32_t y; uint32_t x; uint32_t i; @@ -63,7 +63,9 @@ static uint8_t x = -1; while (++x < cl->wlist.x_size) { - px = ft_hex_to_rgb(*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline)))); + /* px = ft_hex_to_rgb(*(int*)(cl->img.ptr */ + /* + (x * 4 + (y * cl->img.sizeline)))); */ + px = ft_hex_to_rgb(0x00ff2222); *(bmp + i++) = (uint8_t)px.b; *(bmp + i++) = (uint8_t)px.g; *(bmp + i++) = (uint8_t)px.r; |