aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_warp_level.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-02 00:17:42 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-02 00:17:42 +0100
commit7f450e0664b7eb103358b0eeb0667033f7fead85 (patch)
tree024a02d21a47074344a2905280e5c4fd78c6eb8b /src/ft_warp_level.c
parentPreparing music (diff)
download42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.gz
42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.bz2
42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.xz
42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.zst
42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.zip
Another song
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r--src/ft_warp_level.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index cfacd81..9a61484 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -27,6 +27,7 @@ static void
ft_memdel((void**)&ml->sprite_path);
ft_memdel((void**)&ml->nl_tex_path);
ft_memdel((void**)&ml->nlevel_path);
+ ft_memdel((void**)&ml->music_path);
ft_memdel((void**)&ml->mapl);
ft_free_words(ml->map);
ft_memdel((void**)&ml);
@@ -35,6 +36,8 @@ static void
static void
ft_del_some(t_cub *cl)
{
+ uint8_t i;
+
cl->plist->pos_x = 0;
cl->plist->pos_y = 0;
cl->plist->start_x = 0;
@@ -47,18 +50,13 @@ static void
cl->f_rgb = ft_init_rgb();
cl->c_rgb = ft_init_rgb();
cl->rlist = ft_init_s_ray();
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[0].img);
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[1].img);
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[2].img);
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[3].img);
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[4].img);
- mlx_destroy_image(cl->wlist->wlx, cl->tlist[5].img);
- cl->tlist[0].img = NULL;
- cl->tlist[1].img = NULL;
- cl->tlist[2].img = NULL;
- cl->tlist[3].img = NULL;
- cl->tlist[4].img = NULL;
- cl->tlist[5].img = NULL;
+ i = 0;
+ while (i < 5)
+ {
+ mlx_destroy_image(cl->wlist->wlx, cl->tlist[i].img);
+ cl->tlist[i].img = NULL;
+ i++;
+ }
}
int8_t