diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | inc/cub3d.h | 1 | ||||
-rw-r--r-- | src/ft_parse_map.c | 7 | ||||
-rw-r--r-- | src/ft_print_list.c | 16 |
4 files changed, 20 insertions, 5 deletions
@@ -29,6 +29,7 @@ SRCS_NAME += ft_check_empty_line.c SRCS_NAME += ft_free_words.c SRCS_NAME += ft_map_error.c SRCS_NAME += ft_init_winlx.c +SRCS_NAME += ft_print_list.c #------------------------------------------------------------------------------# SRCS = $(addprefix ${SRCS_DIR},${SRCS_NAME}) #------------------------------------------------------------------------------# diff --git a/inc/cub3d.h b/inc/cub3d.h index 49f77ec..be40e49 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -54,5 +54,6 @@ void ft_check_empty_line(int fd, void ft_free_words(char **words, char *line); int ft_map_error(unsigned int linum, t_win *wlist); int ft_init_winlx(t_win *wlist); +void ft_print_list(t_win *wlist); #endif diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index d078337..c7081b1 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -53,9 +53,6 @@ ft_parse_map(const char *map_path, t_win *wlist) ft_check_empty_line(fd, 6, wlist); if (ft_get_sprite_tex(fd, wlist) < 0) return ; - ft_printf("[%s]\n", wlist->clist->no_tex_path); - ft_printf("[%s]\n", wlist->clist->so_tex_path); - ft_printf("[%s]\n", wlist->clist->we_tex_path); - ft_printf("[%s]\n", wlist->clist->ea_tex_path); - ft_printf("[%s]\n", wlist->clist->sprite_path); + ft_get_colors(fd, wlist); + ft_print_list(wlist); } diff --git a/src/ft_print_list.c b/src/ft_print_list.c new file mode 100644 index 0000000..547bdb2 --- /dev/null +++ b/src/ft_print_list.c @@ -0,0 +1,16 @@ +#include <libft.h> +#include <cub3d.h> + +void +ft_print_list(t_win *wlist) +{ + ft_printf("x size [%d]\n", wlist->x_size); + ft_printf("y size [%d]\n", wlist->y_size); + ft_printf("North - [%s]\n", wlist->clist->no_tex_path); + ft_printf("South - [%s]\n", wlist->clist->so_tex_path); + ft_printf("West -- [%s]\n", wlist->clist->we_tex_path); + ft_printf("East -- [%s]\n", wlist->clist->ea_tex_path); + ft_printf("Sprite [%s]\n", wlist->clist->sprite_path); + ft_printf("F color [%d]\n", wlist->clist->f_color); + ft_printf("C color [%d]\n", wlist->clist->c_color); +} |