aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-01 17:43:25 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-01 17:43:25 +0200
commit2e4272268bf56f1b2dc7541703cc0526290a026a (patch)
tree577468592281dfd7b9e89170007465111e684b86
parentOptimization (diff)
download42-cub3d-2e4272268bf56f1b2dc7541703cc0526290a026a.tar.gz
42-cub3d-2e4272268bf56f1b2dc7541703cc0526290a026a.tar.bz2
42-cub3d-2e4272268bf56f1b2dc7541703cc0526290a026a.tar.xz
42-cub3d-2e4272268bf56f1b2dc7541703cc0526290a026a.tar.zst
42-cub3d-2e4272268bf56f1b2dc7541703cc0526290a026a.zip
Still segv
-rw-r--r--map/lvl_six.cub2
-rw-r--r--map/map_seven.cub2
-rw-r--r--src/ft_draw_sprite.c3
3 files changed, 3 insertions, 4 deletions
diff --git a/map/lvl_six.cub b/map/lvl_six.cub
index 7e3aad9..7b49af1 100644
--- a/map/lvl_six.cub
+++ b/map/lvl_six.cub
@@ -13,7 +13,7 @@ LT ./media/img/tex/cowtits.xpm
L ./map/map_four.cub
T ./media/img/sprites/spikes.xpm
-SH 5
+SH 3
MU ./media/sound/DEVANT-LES-KAISSONS.wav
1111111111111111111
diff --git a/map/map_seven.cub b/map/map_seven.cub
index 8959a92..93afdff 100644
--- a/map/map_seven.cub
+++ b/map/map_seven.cub
@@ -14,7 +14,7 @@ C 150,150,150
1111111111111111111
1000000000000000001
1000000000000000001
-10e0e0e00e0e0e0e001
+100000000e000000001
1000000000000000001
1000000000000000001
1000000000000000001
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c
index a17ab98..a127e31 100644
--- a/src/ft_draw_sprite.c
+++ b/src/ft_draw_sprite.c
@@ -98,8 +98,7 @@ void
sprite->spriteheight * 128;
sprite->tex_y = ((d * cl->tlist[sprite->current_sprite].img_h / 2) /
sprite->spriteheight) / 128;
- if (
- sprite->transformy > 0 &&
+ if (sprite->transformy > 0 &&
cl->tlist[sprite->current_sprite].ptr[sprite->tex_x * 4 + 4 *
cl->tlist[sprite->current_sprite].img_w * sprite->tex_y]
&& cl->rlist.wall_dist_tab[sprite->x] > sprite->transformy)