diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-03-09 18:53:35 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-03-09 18:53:35 +0100 |
commit | 00f719e87a853f1c0b5dfc7085f605b452e75314 (patch) | |
tree | 1af5b195d41e26a284bec552aa9f07e4cc217db8 /src/ft_get_sprite.c | |
parent | Norme (diff) | |
parent | gang (diff) | |
download | 42-cub3d-00f719e87a853f1c0b5dfc7085f605b452e75314.tar.gz 42-cub3d-00f719e87a853f1c0b5dfc7085f605b452e75314.tar.bz2 42-cub3d-00f719e87a853f1c0b5dfc7085f605b452e75314.tar.xz 42-cub3d-00f719e87a853f1c0b5dfc7085f605b452e75314.tar.zst 42-cub3d-00f719e87a853f1c0b5dfc7085f605b452e75314.zip |
Merge branch 'shpritz'
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_sprite.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index 4580681..10c6bdd 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -19,18 +19,21 @@ void { size_t x; size_t y; + uint8_t i; x = 1; y = 1; + i = 0; while (clist->mlist.map[y]) { while (clist->mlist.map[y][x]) { if (ft_ischarset("2", clist->mlist.map[y][x])) { - clist->sp_list.s_pos_x = x + 0.5; - clist->sp_list.s_pos_y = y + 0.5; - return ; + clist->mlist.sprite_nbr++; + clist->sprites[i].s_pos_x = x; + clist->sprites[i].s_pos_y = y; + i++; } x++; } |