From 6cb1abce1e514d6446511c1a038dbee4f4301cf7 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 4 Mar 2020 16:43:11 +0100 Subject: defines --- inc/cub3d_defines.h | 8 ++++++++ src/ft_save_to_bmp.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index c0d3355..4ce875b 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -109,6 +109,14 @@ enum # define FT_SCR_SIZE "1920x1080" # endif +/* +** ====== BMP ====== +*/ + +# ifndef FT_BMP_SAVE_DIR +# define FT_BMP_SAVE_DIR "./" +# endif + /* ** ====== MAP ERROR MSG ====== */ diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c index d751ea0..b570307 100644 --- a/src/ft_save_to_bmp.c +++ b/src/ft_save_to_bmp.c @@ -18,15 +18,15 @@ static int8_t ft_convert_image_to_bmp(t_bmp_file bmp_file, void *img, t_cub *cl) { - int32_t filelen; - uint8_t *bmp; + /* 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); + /* (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); */ return (0); } -- cgit v1.2.3