diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-05 00:13:59 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-05 00:13:59 +0100 |
commit | b289c06d95448027a55f5bf788bbfe8f6d8e2a24 (patch) | |
tree | f626824669c4a5743aafcc02a487c67a4c10a581 /src/ft_save_to_bmp.c | |
parent | Nice bmp (diff) | |
download | 42-cub3d-b289c06d95448027a55f5bf788bbfe8f6d8e2a24.tar.gz 42-cub3d-b289c06d95448027a55f5bf788bbfe8f6d8e2a24.tar.bz2 42-cub3d-b289c06d95448027a55f5bf788bbfe8f6d8e2a24.tar.xz 42-cub3d-b289c06d95448027a55f5bf788bbfe8f6d8e2a24.tar.zst 42-cub3d-b289c06d95448027a55f5bf788bbfe8f6d8e2a24.zip |
it's all black
Diffstat (limited to 'src/ft_save_to_bmp.c')
-rw-r--r-- | src/ft_save_to_bmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c index 7d242c6..bc4547a 100644 --- a/src/ft_save_to_bmp.c +++ b/src/ft_save_to_bmp.c @@ -52,6 +52,7 @@ static uint8_t uint32_t x; uint32_t i; + (void)img; if (!(bmp = (uint8_t*)malloc((3 * cl->wlist.x_size * cl->wlist.y_size) * sizeof(uint8_t)))) return (NULL); @@ -62,7 +63,7 @@ static uint8_t x = -1; while (++x < cl->wlist.x_size) { - px = ft_hex_to_rgb(*(int*)(img.ptr + (x * 4 + (y * img.sizeline)))); + px = ft_hex_to_rgb(*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline)))); *(bmp + i++) = (uint8_t)px.b; *(bmp + i++) = (uint8_t)px.g; *(bmp + i++) = (uint8_t)px.r; |