From 9884607b90b18a5a1964a558733388a252f30a96 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 18 Mar 2020 17:51:13 +0100 Subject: Added a cool effect on map back --- src/ft_draw_hud.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c index fff75b0..36b987a 100644 --- a/src/ft_draw_hud.c +++ b/src/ft_draw_hud.c @@ -16,15 +16,18 @@ static void ft_put_image_back_to_ptr(uint16_t y, uint16_t x, t_cub *cl) { + uint32_t col; + + col = 0x00dfdfdf; *(cl->img.ptr + x * 4 + (cl->img.sizeline * y)) = (uint8_t)*(cl->tlist[16].ptr + cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y); + cl->tlist[16].img_w * cl->tlist[16].tex_y) & col; *(cl->img.ptr + x * 4 + (cl->img.sizeline * y) + 1) = (uint8_t)*(cl->tlist[16].ptr + cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y + 1); + cl->tlist[16].img_w * cl->tlist[16].tex_y + 1) & col; *(cl->img.ptr + x * 4 + (cl->img.sizeline * y) + 2) = (uint8_t)*(cl->tlist[16].ptr + cl->tlist[16].tex_x * 4 + 4 * - cl->tlist[16].img_w * cl->tlist[16].tex_y + 2); + cl->tlist[16].img_w * cl->tlist[16].tex_y + 2) & col; } static void -- cgit v1.2.3