aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_sprites.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-28 16:46:40 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-28 16:46:40 +0100
commitb3aecb150f55ebc9dde7c1b09559d1566e9e92a6 (patch)
treefec17255ec594ddfb6f98121d987ada32461db06 /src/ft_init_sprites.c
parentnormed (diff)
download42-cub3d-b3aecb150f55ebc9dde7c1b09559d1566e9e92a6.tar.gz
42-cub3d-b3aecb150f55ebc9dde7c1b09559d1566e9e92a6.tar.bz2
42-cub3d-b3aecb150f55ebc9dde7c1b09559d1566e9e92a6.tar.xz
42-cub3d-b3aecb150f55ebc9dde7c1b09559d1566e9e92a6.tar.zst
42-cub3d-b3aecb150f55ebc9dde7c1b09559d1566e9e92a6.zip
All in sprites
Diffstat (limited to '')
-rw-r--r--src/ft_init_sprites.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ft_init_sprites.c b/src/ft_init_sprites.c
index 1a23c26..ee9506f 100644
--- a/src/ft_init_sprites.c
+++ b/src/ft_init_sprites.c
@@ -49,5 +49,13 @@ int8_t
}
if (!(*((*sprites) + 8) = (t_sprite*)ft_calloc(512, sizeof(t_sprite))))
return (-1);
+ if (!(*((*sprites) + 9) = (t_sprite*)ft_calloc(64, sizeof(t_sprite))))
+ return (-1);
+ i = 9;
+ while (++i < 13)
+ {
+ if (!(*((*sprites) + i) = (t_sprite*)ft_calloc(4, sizeof(t_sprite))))
+ return (-1);
+ }
return (0);
}