diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-07 20:30:07 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-07 20:30:07 +0100 |
commit | ced2be0469537a5d21043325c9bc54762197ec30 (patch) | |
tree | 0147b95e157bec2b301e82badc1532d40335201b /src/ft_draw_verline.c | |
parent | The sky is nice (diff) | |
download | 42-cub3d-ced2be0469537a5d21043325c9bc54762197ec30.tar.gz 42-cub3d-ced2be0469537a5d21043325c9bc54762197ec30.tar.bz2 42-cub3d-ced2be0469537a5d21043325c9bc54762197ec30.tar.xz 42-cub3d-ced2be0469537a5d21043325c9bc54762197ec30.tar.zst 42-cub3d-ced2be0469537a5d21043325c9bc54762197ec30.zip |
qwe
Diffstat (limited to 'src/ft_draw_verline.c')
-rw-r--r-- | src/ft_draw_verline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index 3198357..8621668 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -18,9 +18,10 @@ static void { while ((uint32_t)y < cl->wlist.y_size) { + cl->y = y; *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) - = ft_rgb_to_hex(cl->f_rgb); + = ft_darken_floor(cl->f_rgb, cl); y++; } } @@ -33,9 +34,10 @@ static void i = 0; while (i <= y) { + cl->y = i; *(int*)(cl->img.ptr + (x * 4 + (i * cl->img.sizeline))) - = ft_darken_rgb(cl->c_rgb, cl); + = ft_darken_ceil(cl->c_rgb, cl); i++; } } |