aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_del_map.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_del_map.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ft_del_map.c b/src/ft_del_map.c
new file mode 100644
index 0000000..0c03007
--- /dev/null
+++ b/src/ft_del_map.c
@@ -0,0 +1,36 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_del_map.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/14 17:28:46 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:28:46 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
+#include <libft.h>
+#include <cub3d.h>
+#include <stdint.h>
+
+void
+ ft_del_map(t_map *ml)
+{
+ ft_memdel((void*)&ml->filename);
+ ft_memdel((void*)&ml->no_tex_path);
+ ft_memdel((void*)&ml->so_tex_path);
+ ft_memdel((void*)&ml->ea_tex_path);
+ ft_memdel((void*)&ml->we_tex_path);
+ ft_memdel((void*)&ml->nl_tex_path);
+ ft_memdel((void*)&ml->fl_tex_path);
+ ft_memdel((void*)&ml->ce_tex_path);
+ ft_memdel((void*)&ml->nlevel_path);
+ ft_memdel((void*)&ml->skybox_path);
+ ft_memdel((void*)&ml->traps_path);
+ ft_memdel((void*)&ml->music_path);
+ ft_memdel((void*)&ml->music_cmd);
+ ft_memdel((void*)&ml->mapl);
+ ft_free_words(ml->map);
+ ft_free_sprites_path(ml->sprite_path);
+}