diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-14 18:47:19 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-14 18:47:19 +0100 |
commit | 8e6080e73661cc8747b21b1153e4336796575cf7 (patch) | |
tree | 2eaec487a73f9df1a69627cff23c42746f1b296e /src/ft_draw_verline.c | |
parent | Added turn around keys (diff) | |
download | 42-cub3d-8e6080e73661cc8747b21b1153e4336796575cf7.tar.gz 42-cub3d-8e6080e73661cc8747b21b1153e4336796575cf7.tar.bz2 42-cub3d-8e6080e73661cc8747b21b1153e4336796575cf7.tar.xz 42-cub3d-8e6080e73661cc8747b21b1153e4336796575cf7.tar.zst 42-cub3d-8e6080e73661cc8747b21b1153e4336796575cf7.zip |
Norme is bav
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_verline.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index f7e5a1c..6584bcb 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -1,7 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_draw_verline.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:22:23 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:23:42 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + #include <cub3d.h> static void -ft_draw_floor(t_cub *cl, int32_t y, int32_t x) + ft_draw_floor(t_cub *cl, int32_t y, int32_t x) { while (y <= cl->wlist->y_size) { @@ -12,7 +24,7 @@ ft_draw_floor(t_cub *cl, int32_t y, int32_t x) } static void -ft_draw_ceil(t_cub *cl, int32_t y, int32_t x) + ft_draw_ceil(t_cub *cl, int32_t y, int32_t x) { int16_t i; @@ -26,7 +38,7 @@ ft_draw_ceil(t_cub *cl, int32_t y, int32_t x) } int8_t -ft_draw_verline(t_cub *cl, int32_t x, int32_t y1, int32_t y2, int32_t color) + ft_draw_verline(t_cub *cl, int32_t x, int32_t y1, int32_t y2) { int32_t y; int32_t t; @@ -47,7 +59,7 @@ ft_draw_verline(t_cub *cl, int32_t x, int32_t y1, int32_t y2, int32_t color) ft_draw_ceil(cl, y, x); while (y <= y2) { - *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = color; + *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = 0x0000ffaa; y++; } ft_draw_floor(cl, y, x); |