aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_textures.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_draw_textures.c')
-rw-r--r--src/ft_draw_textures.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_draw_textures.c b/src/ft_draw_textures.c
index 5bf0854..533564d 100644
--- a/src/ft_draw_textures.c
+++ b/src/ft_draw_textures.c
@@ -46,18 +46,18 @@ void
void
ft_choose_tex(uint16_t x, t_cub *clist)
{
- if (clist->rlist.sqy == clist->mlist.nlx
- && clist->rlist.sqx == clist->mlist.nly)
+ if (clist->rlist.sqx == clist->mlist.nlx
+ && clist->rlist.sqy == clist->mlist.nly)
{
clist->w_side = 5;
}
else
{
- if (clist->rlist.side == 0 && clist->rlist.x_ray_dir < 0)
+ if (clist->rlist.side == 0 && clist->rlist.y_ray_dir < 0)
clist->w_side = 1;
- else if (clist->rlist.side == 0 && clist->rlist.x_ray_dir > 0)
+ else if (clist->rlist.side == 0 && clist->rlist.y_ray_dir > 0)
clist->w_side = 0;
- else if (clist->rlist.side == 1 && clist->rlist.y_ray_dir > 0)
+ else if (clist->rlist.side == 1 && clist->rlist.x_ray_dir > 0)
clist->w_side = 3;
else
clist->w_side = 2;