diff options
Diffstat (limited to 'src/ft_floor_cast.c')
-rw-r--r-- | src/ft_floor_cast.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index de53666..715eacc 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -29,7 +29,7 @@ static void if ((dist = cl->rlist.row_dist) <= 0) dist = 0.0001; - calc = (dist * 0.4); + calc = (dist * 0.1 * cl->mlist.darklvl); calc = (calc >= 255) ? (255) : (calc); calc = (calc < 1) ? (1) : (calc); cl->img.ptr[x * 4 + (cl->img.sizeline * y)] = @@ -51,6 +51,10 @@ static void * (rl->x_floor - rl->x_cell)) % (cl->tlist[tid].img_w); cl->tlist[tid].tex_x = (int32_t)(cl->tlist[tid].img_h * (rl->y_floor - rl->y_cell)) % (cl->tlist[tid].img_h); + cl->tlist[tid].tex_x = (cl->tlist[tid].tex_x > 0) + ? (cl->tlist[tid].tex_x) : (-cl->tlist[tid].tex_x); + cl->tlist[tid].tex_y = (cl->tlist[tid].tex_y > 0) + ? (cl->tlist[tid].tex_y) : (-cl->tlist[tid].tex_y); } static void |