aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-14 19:10:57 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-14 19:10:57 +0100
commit72454c55ab9075fc5f52d8af8c85de74e807dcd2 (patch)
treef3cdfa274c4a719da19435cacfd58d095f5b9b6b
parentPerfect but leaks (diff)
download42-cub3d-72454c55ab9075fc5f52d8af8c85de74e807dcd2.tar.gz
42-cub3d-72454c55ab9075fc5f52d8af8c85de74e807dcd2.tar.bz2
42-cub3d-72454c55ab9075fc5f52d8af8c85de74e807dcd2.tar.xz
42-cub3d-72454c55ab9075fc5f52d8af8c85de74e807dcd2.tar.zst
42-cub3d-72454c55ab9075fc5f52d8af8c85de74e807dcd2.zip
In progress
Diffstat (limited to '')
-rw-r--r--map/map_one.cub4
-rw-r--r--src/ft_exit.c2
-rw-r--r--src/ft_tex_init.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/map/map_one.cub b/map/map_one.cub
index 64c20f6..94c146c 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -22,8 +22,8 @@ SH 1
111111111111111111
100000000000000001
1000E0T00000000001
-100100000000000001
-101100000111000001
+100100300000000001
+101104000111000001
111111111111110011
1000001 100001
1001001 100001
diff --git a/src/ft_exit.c b/src/ft_exit.c
index e7b344e..f1da643 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -69,6 +69,7 @@ static void
mlx_destroy_image(clist->wlist.wlx, clist->tlist[7].img);
if (clist->mlist.istraps && clist->tlist[15].img)
mlx_destroy_image(clist->wlist.wlx, clist->tlist[15].img);
+ ft_del_extra_sprites(clist);
}
static void
@@ -98,7 +99,6 @@ int
{
if (clist->walltexgood)
ft_del_tex(clist);
- ft_del_extra_sprites(clist);
if (clist->wlist.inited)
{
if (FT_OS == 1)
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index cae07bd..9a6da10 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -44,9 +44,11 @@ static void
while (cl->mlist.sprite_path[i][0])
{
cl->tlist[i + 7].img = mlx_xpm_file_to_image(cl->wlist.wlx,
- cl->mlist.sprite_path[i], &cl->tlist[i + 7].img_w, &cl->tlist[i + 7].img_h);
+ cl->mlist.sprite_path[i], &cl->tlist[i + 7].img_w,
+ &cl->tlist[i + 7].img_h);
cl->tlist[i + 7].ptr = mlx_get_data_addr(cl->tlist[i + 7].img,
- &cl->tlist[i + 7].bpp, &cl->tlist[i + 7].sizeline, &cl->tlist[i + 7].endian);
+ &cl->tlist[i + 7].bpp, &cl->tlist[i + 7].sizeline,
+ &cl->tlist[i + 7].endian);
i++;
}
}