/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_key_loop.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/17 20:06:26 by rbousset #+# #+# */ /* Updated: 2020/02/17 20:06:29 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include #include #include void ft_suffer_animation(t_cub *cl) { 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; while (++x < (int32_t)cl->wlist.x_size) { rgb = ft_hex_to_og_rgb(*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline)))); rgb.r += 120; *(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->doicast = 0; }