aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_sprite.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c
index dc6f54f..fcc2a8b 100644
--- a/src/ft_draw_sprite.c
+++ b/src/ft_draw_sprite.c
@@ -16,25 +16,25 @@
#include <stdlib.h>
#include <math.h>
-static void
- ft_sort_sprites_norme(float *dist_tab, int16_t *i, uint16_t j, t_cub *cl)
-{
- uint32_t tmp;
- uint32_t it;
+/* static void */
+/* ft_sort_sprites_norme(float *dist_tab, int16_t *i, uint16_t j, t_cub *cl) */
+/* { */
+/* uint32_t tmp; */
+/* uint32_t it; */
- it = *i;
- tmp = 0;
- if (dist_tab[it] < dist_tab[it + 1])
- {
- tmp = dist_tab[it];
- dist_tab[it] = dist_tab[it + 1];
- dist_tab[it + 1] = tmp;
- 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;
- *i = -1;
- }
-}
+/* it = *i; */
+/* tmp = 0; */
+/* if (dist_tab[it] < dist_tab[it + 1]) */
+/* { */
+/* tmp = dist_tab[it]; */
+/* dist_tab[it] = dist_tab[it + 1]; */
+/* dist_tab[it + 1] = tmp; */
+/* 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; */
+/* *i = -1; */
+/* } */
+/* } */
void
ft_sort_sprites(t_cub *cl, int16_t it, int16_t jt)
@@ -52,17 +52,17 @@ void
(cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) +
(cl->plist.pos_y - cl->sprites[jt][it].s_pos_y) *
(cl->plist.pos_y - cl->sprites[jt][it].s_pos_y));
- cl->mlist.sprite_order[jt][it] = it;
+ /* cl->mlist.sprite_order[jt][it] = it; */
}
it = -1;
}
- jt = -1;
- while (++jt < FT_TOTAL_SPRT)
- {
- it = -1;
- while (++it < cl->mlist.sprite_nbr[jt] - 1)
- ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl);
- }
+ /* jt = -1; */
+ /* while (++jt < FT_TOTAL_SPRT) */
+ /* { */
+ /* it = -1; */
+ /* while (++it < cl->mlist.sprite_nbr[jt] - 1) */
+ /* ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl); */
+ /* } */
ft_sort_s_t(cl, dist_tab);
}