From cc85b0a701b558e18299822f7091fc2fd137b14b Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 25 Feb 2020 16:43:54 +0100 Subject: bunch of garbage --- src/ft_get_sprite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ft_get_sprite.c') diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index 806489f..76629c5 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -28,8 +28,8 @@ void { 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; + clist->sprites.s_pos_x = x + 0.5; + clist->sprites.s_pos_y = y + 0.5; return ; } x++; -- cgit v1.2.3 From 51dd3734caadd0c3b943da3410772c65558280cc Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 25 Feb 2020 17:33:15 +0100 Subject: ??? --- src/ft_get_sprite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ft_get_sprite.c') diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index 76629c5..d99f12e 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -28,8 +28,8 @@ void { if (ft_ischarset("2", clist->mlist->map[y][x])) { - clist->sprites.s_pos_x = x + 0.5; - clist->sprites.s_pos_y = y + 0.5; + clist->sprites.spritex = x + 0.5; + clist->sprites.spritey = y + 0.5; return ; } x++; -- cgit v1.2.3 From a1891c76be7688be7f9e213308b6af33e3d3dacf Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Sat, 29 Feb 2020 20:34:02 +0100 Subject: debugging... --- src/ft_get_sprite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ft_get_sprite.c') diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index d99f12e..5f9a0bc 100644 --- a/src/ft_get_sprite.c +++ b/src/ft_get_sprite.c @@ -28,8 +28,8 @@ void { if (ft_ischarset("2", clist->mlist->map[y][x])) { - clist->sprites.spritex = x + 0.5; - clist->sprites.spritey = y + 0.5; + clist->sprites.spritex = x; + clist->sprites.spritey = y; return ; } x++; -- cgit v1.2.3 From 04658c5e9a019917c3f8ffeb84562c328da0a885 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 6 Mar 2020 18:40:56 +0100 Subject: ils se cachent (mal) --- src/ft_get_sprite.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ft_get_sprite.c') diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c index 5f9a0bc..84feeff 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->sprites.spritex = x; - clist->sprites.spritey = y; - return ; + clist->mlist->sprite_nbr++; + clist->sprites[i].s_pos_x = x; + clist->sprites[i].s_pos_y = y; + i++; } x++; } -- cgit v1.2.3