aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_verline.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-08 17:59:07 +0100
committerRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-08 17:59:07 +0100
commit427d1819c0991b1fb94708a5b8580828c8462d2a (patch)
tree340d6eacc04aea3730b8bc056a1a21ebcc5b4ed3 /src/ft_draw_verline.c
parentPsychedelic (diff)
download42-cub3d-427d1819c0991b1fb94708a5b8580828c8462d2a.tar.gz
42-cub3d-427d1819c0991b1fb94708a5b8580828c8462d2a.tar.bz2
42-cub3d-427d1819c0991b1fb94708a5b8580828c8462d2a.tar.xz
42-cub3d-427d1819c0991b1fb94708a5b8580828c8462d2a.tar.zst
42-cub3d-427d1819c0991b1fb94708a5b8580828c8462d2a.zip
We close
Diffstat (limited to '')
-rw-r--r--src/ft_draw_verline.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index dd7697a..8e71457 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -28,6 +28,7 @@ static void
cl->img.ptr[x * 4 + cl->wlist.x_size * y + 3] = (int8_t)0;
}
+#include <stdio.h>
static void
ft_draw_floor(t_cub *cl, int32_t y, int32_t x)
{
@@ -40,7 +41,6 @@ static void
dist_player = 0.0;
while ((uint32_t)y < cl->wlist.y_size)
{
- ft_floor_cast(cl);
curr_dist = cl->wlist.y_size / (2.0 * y - cl->wlist.y_size);
weight = (curr_dist - dist_player)
/ (cl->rlist.wall_dist - dist_player);
@@ -52,10 +52,10 @@ static void
* cl->tlist[6].img_w) % cl->tlist[6].img_w;
cl->tlist[6].tex_y = (int32_t)(curr_floor_y
* cl->tlist[6].img_h) % cl->tlist[6].img_h;
- cl->tlist[6].tex_x = (cl->tlist[6].tex_x > 0)
- ? (cl->tlist[6].tex_x) : (-cl->tlist[6].tex_x);
- cl->tlist[6].tex_y = (cl->tlist[6].tex_y > 0)
- ? (cl->tlist[6].tex_y) : (-cl->tlist[6].tex_y);
+ /* cl->tlist[6].tex_x = (cl->tlist[6].tex_x > 0) */
+ /* ? (cl->tlist[6].tex_x) : (-cl->tlist[6].tex_x); */
+ /* cl->tlist[6].tex_y = (cl->tlist[6].tex_y > 0) */
+ /* ? (cl->tlist[6].tex_y) : (-cl->tlist[6].tex_y); */
ft_draw_floor_tex(cl, y, x, cl->tlist[6].tex_y);
/* *(int*)(cl->img.ptr + */
/* (x * 4 + (y * cl->img.sizeline))) */