From 7b61072321c71c1612a7b33d2e8d722a49c5bc99 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 18:06:17 +0100 Subject: ca tue --- src/ft_suffer_animation.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ft_suffer_animation.c') diff --git a/src/ft_suffer_animation.c b/src/ft_suffer_animation.c index 1a9b51a..b800a39 100644 --- a/src/ft_suffer_animation.c +++ b/src/ft_suffer_animation.c @@ -21,11 +21,9 @@ void { int32_t x; int32_t y; - int32_t col; t_rgb rgb; y = -1; - col = 0x00880000; while (++y < (int32_t)cl->wlist.y_size) { x = -1; @@ -33,14 +31,16 @@ void { rgb = ft_hex_to_og_rgb(*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline)))); - rgb.r += 120; + rgb.r += 150; + rgb.g += 20; + rgb.b += 20; *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(rgb); } - /* if (y < (int32_t)cl->wlist.y_size / 2) */ - /* col += 0x00000000; */ - /* else */ - /* col -= 0x00000000; */ } + cl->plist.life -= 20; + if (cl->plist.life <= 0) + ft_exit(0, cl); + /* TODO death screen here */ cl->doicast = 0; } -- cgit v1.2.3