diff options
-rw-r--r-- | map/map_one.cub | 9 | ||||
-rw-r--r-- | src/ft_draw_sprite.c | 24 |
2 files changed, 21 insertions, 12 deletions
diff --git a/map/map_one.cub b/map/map_one.cub index e928a6c..81982ca 100644 --- a/map/map_one.cub +++ b/map/map_one.cub @@ -18,16 +18,17 @@ T ./media/img/spikes.xpm SH 2 111111111111111111 -140000000002220001 -100000E00000000001 -100100000000333001 +100000000000333301 +10000000E000444401 +100000000000222201 +100100000000000001 101100000111000001 111111111111110011 1000001 100001 1001001 100001 1011001 100001 111101111111110111 -100500001101010111 +120500001101010111 100000000000000011 100000000000000011 11T000001101000111 diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c index 66d69e5..d0447f6 100644 --- a/src/ft_draw_sprite.c +++ b/src/ft_draw_sprite.c @@ -33,7 +33,7 @@ static void tmp = cl->mlist.sprite_order[j][it]; cl->mlist.sprite_order[j][it] = cl->mlist.sprite_order[j][it + 1]; cl->mlist.sprite_order[j][it + 1] = tmp; - it = 0; + *i = 0; } } @@ -46,9 +46,9 @@ void it = -1; jt = -1; - while (++jt < cl->mlist.sprite_var) + while (++jt <= cl->mlist.sprite_var) { - while (++it < cl->mlist.sprite_nbr) + while (++it <= cl->mlist.sprite_nbr) { dist_tab[jt][it] = ((cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) * @@ -59,11 +59,19 @@ void } it = -1; } - it = -1; - jt = -1; - while (++jt < cl->mlist.sprite_var) - while (++it < cl->mlist.sprite_nbr) - ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl); + it = 0; + jt = 0; + while (jt < 3) + { + while (it < 6) + { + ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl); + printf("%d\n", jt); + it++; + } + it = 0; + jt++; + } } static void |