diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_drawmap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ft_drawmap.c b/src/ft_drawmap.c index 0380f2d..4d78426 100644 --- a/src/ft_drawmap.c +++ b/src/ft_drawmap.c @@ -55,7 +55,14 @@ static void void ft_drawmap(t_cub *clist) { - mlx_clear_window(clist->wlist->wlx, clist->wlist->winptr); + 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_draw_core_map(clist->map, clist); ft_draw_player(clist->plist, clist); + /* mlx_clear_window(clist->wlist->wlx, clist->wlist->winptr); */ + mlx_put_image_to_window(clist->wlist->wlx, + clist->wlist->winptr, clist->img.img, 0, 0); + mlx_destroy_image(clist->wlist->wlx, clist->img.img); } |