aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_save_to_bmp.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 16:24:10 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 16:24:10 +0100
commit93e9d655f14a89477e495aece6d91b07594076d8 (patch)
treee75e792139891fb6007cef8e68cd7f022672c2c0 /src/ft_save_to_bmp.c
parentTab (diff)
download42-cub3d-93e9d655f14a89477e495aece6d91b07594076d8.tar.gz
42-cub3d-93e9d655f14a89477e495aece6d91b07594076d8.tar.bz2
42-cub3d-93e9d655f14a89477e495aece6d91b07594076d8.tar.xz
42-cub3d-93e9d655f14a89477e495aece6d91b07594076d8.tar.zst
42-cub3d-93e9d655f14a89477e495aece6d91b07594076d8.zip
Structs inited
Diffstat (limited to 'src/ft_save_to_bmp.c')
-rw-r--r--src/ft_save_to_bmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c
index f69316f..4bfaace 100644
--- a/src/ft_save_to_bmp.c
+++ b/src/ft_save_to_bmp.c
@@ -16,23 +16,24 @@
#include <stdint.h>
static int8_t
- ft_convert_image_to_bmp(void *img, t_cub *cl)
+ ft_convert_image_to_bmp(t_bmp_file *bmp_file, void *img, t_cub *cl)
{
int32_t filelen;
uint8_t *bmp;
(void)img;
+ (void)bmp_file;
filelen = 54 + 3 * cl->wlist.x_size * cl->wlist.y_size;
if (!(bmp = (uint8_t*)malloc((filelen - 54) * sizeof(uint8_t))))
return (-1);
- ft_memdel((void**)&bmp)
+ ft_memdel((void**)&bmp);
return (0);
}
int8_t
- ft_save_to_bmp(t_bmp bmp, void *img, t_cub *cl)
+ ft_save_to_bmp(t_bmp_file *bmp_file, void *img, t_cub *cl)
{
- if (ft_convert_image_to_bmp(img, cl) < 0)
+ if (ft_convert_image_to_bmp(bmp_file, img, cl) < 0)
return (-1);
return (0);
}