aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_verline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_draw_verline.c')
-rw-r--r--src/ft_draw_verline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index 0b97cc5..5f93ce2 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -42,6 +42,7 @@ int8_t
{
int32_t y;
int32_t t;
+ int32_t d;
if (y1 < 0)
y1 = 0;
@@ -60,8 +61,11 @@ int8_t
ft_choose_tex(cl);
while (y <= y2)
{
- cl->rlist.step_tex_v = 1.0 * cl->tlist[clist->w_side].img_w - cl->rlist.line_h;
- /**(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = (cl->rlist.side) ? 0x2200ffaa : 0x0000ffaa;*/
+ d = y * 256 - cl->wlist->y_size * 128 + cl->rlist.line_h * 128;
+ cl->tlist[cl->w_side].tex_y = ((d * cl->tlist[cl->w_side].img_w)
+ / cl->rlist.line_h) / 256;
+ ft_draw_texture(cl, x, y, cl->tlist[cl->w_side].tex_y);
+ /**(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = (cl->rlist.side) ? 0x2200ffaa : 0x0000ffaa;*/
y++;
}
ft_draw_floor(cl, y, x);