aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sort_s_t.c
diff options
context:
space:
mode:
authorsalaaad2 <arthudurant263@gmail.com>2020-03-25 14:40:34 +0100
committersalaaad2 <arthudurant263@gmail.com>2020-03-25 14:40:34 +0100
commit14db635d9afa8457e3dbd3563394e5a06f62d962 (patch)
tree5afb17c6f70ceac630d297be31892ee089cc7eb2 /src/ft_sort_s_t.c
parentOk (diff)
download42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.gz
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.bz2
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.xz
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.zst
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.zip
fuck fuck fuck
Diffstat (limited to 'src/ft_sort_s_t.c')
-rw-r--r--src/ft_sort_s_t.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/ft_sort_s_t.c b/src/ft_sort_s_t.c
new file mode 100644
index 0000000..f015abc
--- /dev/null
+++ b/src/ft_sort_s_t.c
@@ -0,0 +1,37 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_sort_s_t.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/24 20:22:45 by rbousset #+# #+# */
+/* Updated: 2020/03/09 18:56:01 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
+#include <libft.h>
+#include <cub3d.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+/*clearpilled*/
+
+void
+ ft_sort_s_t(t_cub *cl, float dist_tab[8][4096])
+{
+ uint16_t i;
+ int32_t tmp;
+
+ i = 0;
+ while (i < cl->mlist.sprite_var)
+ {
+ if (dist_tab[i][0] < dist_tab[i + 1][0])
+ {
+ i = 0;
+ }
+ i++;
+ }
+}