aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_get_map.c')
-rw-r--r--src/ft_get_map.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
new file mode 100644
index 0000000..a45052c
--- /dev/null
+++ b/src/ft_get_map.c
@@ -0,0 +1,20 @@
+#include <libft.h>
+#include <cub3d.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+int
+ft_get_map(int fd, t_win *wlist)
+{
+ size_t i;
+ char *line;
+
+ ft_free_words(wlist->clist->map, NULL);
+ i = 0;
+ if (!(wlist->clist->map = (char**)malloc(40 * sizeof(char*))))
+ return (-1);
+ while (get_next_line(fd, &line) > 0)
+ {
+ }
+ return (0);
+}