aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_verline.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_verline.c20
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);