diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_warp_level.c | 7 |
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); |