From a67bc79504a399ad0194d104aa250725bf6280b1 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 16 Mar 2020 16:46:55 +0100 Subject: Debug in progress --- src/ft_init_sprites.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/ft_init_sprites.c (limited to 'src/ft_init_sprites.c') diff --git a/src/ft_init_sprites.c b/src/ft_init_sprites.c new file mode 100644 index 0000000..4fa21bf --- /dev/null +++ b/src/ft_init_sprites.c @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_init_lists.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:28:53 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:28:53 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include +#include +#include +#include + +t_sprite + **ft_init_sprites(void) +{ + t_sprite **sprites; + uint8_t i; + + if (!(sprites = (t_sprite**)ft_calloc(8, sizeof(t_sprite*)))) + return (NULL); + i = 0; + while (i < 9) + { + if (!(sprites[i] = (t_sprite*)ft_calloc(4096, sizeof(t_sprite)))) + return (NULL); + i++; + } + return (sprites); +} -- cgit v1.2.3