aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_save_to_bmp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_save_to_bmp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c
index b570307..5d66dd2 100644
--- a/src/ft_save_to_bmp.c
+++ b/src/ft_save_to_bmp.c
@@ -12,9 +12,21 @@
#include <libft.h>
#include <cub3d.h>
+#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
+static char
+ *ft_set_file_name(t_map *ml)
+{
+ char *str;
+
+ if (!(str = (char*)malloc((ft_strlen(ft_strrchr(ml->filename), '/')
+ + 1) * sizeof(char))))
+ return (NULL);
+ ft_sprintf(str, "%s", ft_strrchr(ml->filename));
+}
+
static int8_t
ft_convert_image_to_bmp(t_bmp_file bmp_file, void *img, t_cub *cl)
{