From b15be48033300c00ed2981fb69928905e3a85e86 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 4 Mar 2020 15:30:59 +0100 Subject: Init bmp --- inc/cub3d.h | 3 ++- inc/cub3d_structs.h | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index b1712c1..f7b1a22 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -29,6 +29,7 @@ int ft_init_winptr(t_cub *clist); t_ray ft_init_s_ray(void); t_rgb ft_init_rgb(void); int8_t ft_init_map(t_map *mlist); +t_bmp ft_init_bmp(void); /* ** ====== HOOKS ====== @@ -120,7 +121,7 @@ void ft_set_minimap_scale(t_cub *clist); void *ft_music_thread(void *vargp); void ft_detect(t_cub *cl); void ft_castray(t_cub *cl); -int8_t ft_save_to_bmp(void *img, t_cub *cl); +int8_t ft_save_to_bmp(t_bmp bmp, void *img, t_cub *cl); int ft_error(const char *errmsg, t_cub *clist); uint8_t ft_free_words(char **words); int8_t ft_warp_level(t_cub *cl); diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index ae5ee02..df26c26 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -28,6 +28,15 @@ typedef struct s_win uint32_t y_size; } t_win; +typedef struct s_bmp +{ + uint16_t file_type; + uint32_t file_size; + uint16_t reserv_one; + uint16_t reserv_two; + uint32_t offset_data; +} t_bmp; + typedef struct s_img { void *img; -- cgit v1.2.3