diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
commit | d4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch) | |
tree | d2c5ffb0027860722185bf26b526757360ff1584 /src/ft_draw_verline.c | |
parent | tweaks (diff) | |
parent | Going full stack is bav (diff) | |
download | 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.gz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.bz2 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.xz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.zst 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.zip |
Merge branch 'bmp'
Diffstat (limited to 'src/ft_draw_verline.c')
-rw-r--r-- | src/ft_draw_verline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index b0f9880..d9a35cc 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -15,7 +15,7 @@ static void ft_draw_floor(t_cub *cl, int32_t y, int32_t x) { - while ((uint32_t)y < cl->wlist->y_size) + while ((uint32_t)y < cl->wlist.y_size) { *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(cl->f_rgb); @@ -49,7 +49,7 @@ static void ** i = 0; ** while (i < y) ** { -** d = i * 256 - cl->wlist->y_size * 128 + cl->rlist.line_h * 128; +** d = i * 256 - cl->wlist.y_size * 128 + cl->rlist.line_h * 128; ** d = (d <= 0) ? (-d) : (d); ** ft_printf("%d\n", d); ** tex_y = ((d * cl->tlist[1].img_h) / cl->rlist.line_h) / 256; @@ -63,7 +63,7 @@ static void ** cl->img.ptr[x * 4 + (cl->img.sizeline * i) + 2] = ** (int8_t)cl->tlist[1].ptr[cl->tlist[1].tex_x * 4 + 4 * ** cl->tlist[1].img_h * tex_y + 2]; -** cl->img.ptr[x * 4 + cl->wlist->x_size * i + 3] = (char)0; +** cl->img.ptr[x * 4 + cl->wlist.x_size * i + 3] = (char)0; ** i++; ** } ** } @@ -81,7 +81,7 @@ int8_t (cl->rlist.line_h <= 0) ? (cl->rlist.line_h = 1) : 0; while (y < y2) { - d = y * 256 - cl->wlist->y_size * 128 + cl->rlist.line_h * 128; + d = y * 256 - cl->wlist.y_size * 128 + cl->rlist.line_h * 128; d = (d <= 0) ? (-d) : (d); tex_y = ((d * cl->tlist[cl->w_side].img_h) / cl->rlist.line_h) / 256; (tex_y <= 0) ? (tex_y = 1) : 0; |