aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-11 02:03:18 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-11 02:03:18 +0100
commit15e4ca8491c9b2872b30cb1522f72920514a62f1 (patch)
tree735c8b9fa394d43f51ff6d164dc4f94eb8824753
parentSliding like a champ (diff)
download42-cub3d-15e4ca8491c9b2872b30cb1522f72920514a62f1.tar.gz
42-cub3d-15e4ca8491c9b2872b30cb1522f72920514a62f1.tar.bz2
42-cub3d-15e4ca8491c9b2872b30cb1522f72920514a62f1.tar.xz
42-cub3d-15e4ca8491c9b2872b30cb1522f72920514a62f1.tar.zst
42-cub3d-15e4ca8491c9b2872b30cb1522f72920514a62f1.zip
ft_calc_sprite in a better location, still sliding like a champ
Diffstat (limited to '')
-rw-r--r--map/map_one.cub4
-rw-r--r--src/ft_draw_scene.c2
-rw-r--r--src/ft_raycasting.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/map/map_one.cub b/map/map_one.cub
index f4f9e91..1f7a92c 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -1,4 +1,4 @@
-R 1000 700
+R 1400 800
NO ./media/img/segfot_small.xpm
SO ./media/img/segfot_small.xpm
@@ -9,7 +9,7 @@ S ./media/img/pillar.xpm
C 50,100,200
F 50,190,124
-SH 6
+SH 4
111111111111111111
120000000011000001
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c
index 2cfa3f4..4d15df2 100644
--- a/src/ft_draw_scene.c
+++ b/src/ft_draw_scene.c
@@ -52,7 +52,6 @@ void
}
if (clist->mlist.isskybox)
ft_draw_skybox(clist);
- ft_calc_sprite(clist);
mlx_put_image_to_window(clist->wlist.wlx,
clist->wlist.winptr, clist->img.img, 0, 0);
if (clist->ishud && clist->mlist.isnlvl)
@@ -73,7 +72,6 @@ void
clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
&clist->img.sizeline, &clist->img.endian);
ft_castray(clist);
- ft_calc_sprite(clist);
if (ft_save_to_bmp(clist) < 0)
ft_error(FT_RET_BMP_ERR, FT_ERR_WR_BMP, clist);
mlx_destroy_image(clist->wlist.wlx, clist->img.img);
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c
index 221c43d..2d6d197 100644
--- a/src/ft_raycasting.c
+++ b/src/ft_raycasting.c
@@ -105,7 +105,7 @@ void
i++;
}
ft_floor_cast(cl);
- i = 0;
+ ft_calc_sprite(cl);
ft_memdel((void**)&cl->rlist.wall_dist_tab);
ft_memdel((void**)&cl->rlist.wall_bz);
}