aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_warp_level.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-16 19:05:52 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-16 19:05:52 +0100
commit192f2260f196914e0db07d4695dc85a859f24e26 (patch)
tree58f343a5dd6161da601bf8ccae05acc0782c2e9b /src/ft_warp_level.c
parentin progress (diff)
download42-cub3d-192f2260f196914e0db07d4695dc85a859f24e26.tar.gz
42-cub3d-192f2260f196914e0db07d4695dc85a859f24e26.tar.bz2
42-cub3d-192f2260f196914e0db07d4695dc85a859f24e26.tar.xz
42-cub3d-192f2260f196914e0db07d4695dc85a859f24e26.tar.zst
42-cub3d-192f2260f196914e0db07d4695dc85a859f24e26.zip
Still searching
Diffstat (limited to '')
-rw-r--r--src/ft_warp_level.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 7259275..130b33a 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -45,7 +45,7 @@ static void
static void
ft_del_some(t_cub *cl)
{
- uint8_t i;
+ int8_t i;
cl->plist = ft_init_player();
cl->f_rgb = ft_init_rgb();
@@ -53,10 +53,7 @@ static void
cl->rlist = ft_init_s_ray();
i = -1;
while (++i < 5)
- {
mlx_destroy_image(cl->wlist.wlx, cl->tlist[i].img);
- cl->tlist[i].ptr = NULL;
- }
if (cl->mlist.isnlvl && cl->tlist[5].img)
mlx_destroy_image(cl->wlist.wlx, cl->tlist[5].img);
if (cl->mlist.isftex && cl->tlist[6].img)
@@ -107,7 +104,7 @@ int8_t
tmp_mup = ft_strdup(cl->mlist.music_path);
ft_del_some(cl);
ft_del_map(&cl->mlist);
- if (!(cl->sprites = ft_init_sprites()))
+ if (ft_init_sprites(&cl->sprites) < 0)
return (-1);
if (ft_init_map(&cl->mlist) < 0)
return (-1);