aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_scene.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 15:30:59 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 15:30:59 +0100
commitb15be48033300c00ed2981fb69928905e3a85e86 (patch)
tree83820c3fb66f4f610751ef92780cc1ec53ef7d53 /src/ft_draw_scene.c
parenttryna save (diff)
download42-cub3d-b15be48033300c00ed2981fb69928905e3a85e86.tar.gz
42-cub3d-b15be48033300c00ed2981fb69928905e3a85e86.tar.bz2
42-cub3d-b15be48033300c00ed2981fb69928905e3a85e86.tar.xz
42-cub3d-b15be48033300c00ed2981fb69928905e3a85e86.tar.zst
42-cub3d-b15be48033300c00ed2981fb69928905e3a85e86.zip
Init bmp
Diffstat (limited to 'src/ft_draw_scene.c')
-rw-r--r--src/ft_draw_scene.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c
index 78a56b4..9dcc8df 100644
--- a/src/ft_draw_scene.c
+++ b/src/ft_draw_scene.c
@@ -33,12 +33,15 @@ void
void
ft_draw_scene_bmp(t_cub *clist)
{
+ t_bmp bmp;
+
clist->img.img = mlx_new_image(clist->wlist.wlx,
clist->wlist.x_size, clist->wlist.y_size);
clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
&clist->img.sizeline, &clist->img.endian);
ft_castray(clist);
- if (ft_save_to_bmp(clist->img.img, clist) < 0)
+ bmp = ft_init_bmp();
+ if (ft_save_to_bmp(bmp, clist->img.img, clist) < 0)
ft_error(FT_ERR_WR_BMP, clist);
mlx_destroy_image(clist->wlist.wlx, clist->img.img);
}