diff options
author | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 18:06:17 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 18:06:17 +0100 |
commit | 7b61072321c71c1612a7b33d2e8d722a49c5bc99 (patch) | |
tree | 6369fc33d405013e40e152061bb080e6a5caabf8 /src/ft_suffer_animation.c | |
parent | Performance (diff) | |
download | 42-cub3d-7b61072321c71c1612a7b33d2e8d722a49c5bc99.tar.gz 42-cub3d-7b61072321c71c1612a7b33d2e8d722a49c5bc99.tar.bz2 42-cub3d-7b61072321c71c1612a7b33d2e8d722a49c5bc99.tar.xz 42-cub3d-7b61072321c71c1612a7b33d2e8d722a49c5bc99.tar.zst 42-cub3d-7b61072321c71c1612a7b33d2e8d722a49c5bc99.zip |
ca tue
Diffstat (limited to 'src/ft_suffer_animation.c')
-rw-r--r-- | src/ft_suffer_animation.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; } |