aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_del_sprites_lists.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 16:58:26 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 16:58:26 +0100
commitb34688558a7b9d2b1f95c00a33197cdc017e8dc5 (patch)
tree51c0339d1252a1384113767f1efa5a285f05b325 /src/ft_del_sprites_lists.c
parentRaycasting normed (diff)
download42-cub3d-b34688558a7b9d2b1f95c00a33197cdc017e8dc5.tar.gz
42-cub3d-b34688558a7b9d2b1f95c00a33197cdc017e8dc5.tar.bz2
42-cub3d-b34688558a7b9d2b1f95c00a33197cdc017e8dc5.tar.xz
42-cub3d-b34688558a7b9d2b1f95c00a33197cdc017e8dc5.tar.zst
42-cub3d-b34688558a7b9d2b1f95c00a33197cdc017e8dc5.zip
Norm so far
Diffstat (limited to 'src/ft_del_sprites_lists.c')
-rw-r--r--src/ft_del_sprites_lists.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ft_del_sprites_lists.c b/src/ft_del_sprites_lists.c
new file mode 100644
index 0000000..72e5fa9
--- /dev/null
+++ b/src/ft_del_sprites_lists.c
@@ -0,0 +1,36 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_del_sprites_lists.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_sprites_lists(t_cub *clist)
+{
+ uint8_t i;
+
+ i = 0;
+ while (i < 8)
+ {
+ ft_memdel((void*)&clist->sprites[i]);
+ i++;
+ }
+ ft_memdel((void*)&clist->sprites);
+ i = 0;
+ while (i < 2)
+ {
+ ft_memdel((void*)&clist->weaps[i]);
+ i++;
+ }
+ ft_memdel((void*)&clist->weaps);
+}