diff options
-rw-r--r-- | inc/cub3d_defines.h | 2 | ||||
-rw-r--r-- | map/map_five.cub | 2 | ||||
-rw-r--r-- | src/ft_draw_map.c | 3 | ||||
-rw-r--r-- | src/ft_get_res.c | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 50ccfb6..66303ab 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -114,7 +114,7 @@ enum # define FT_ERR_ALLOCATE "allocation error" # define FT_ERR_READ "read error" # define FT_ERR_ARGS "too many or to few arguments" -# define FT_ERR_RES_SMALL "resolution is too small" +# define FT_ERR_RES_SMALL "resolution is too small, 50x50 minimum pls" # define FT_ERR_RES_ALPHA "resolution should be digits only" # define FT_ERR_NOT_A_CUB "given map is not a .cub" # define FT_ERR_NOT_A_XPM "given texture is not a .xpm" diff --git a/map/map_five.cub b/map/map_five.cub index 6239410..904b706 100644 --- a/map/map_five.cub +++ b/map/map_five.cub @@ -1,4 +1,4 @@ -R 1440 900 +R 1440 1000 NO ./media/img/terre.xpm SO ./media/img/terre.xpm WE ./media/img/terre.xpm diff --git a/src/ft_draw_map.c b/src/ft_draw_map.c index acf671a..2ca5f37 100644 --- a/src/ft_draw_map.c +++ b/src/ft_draw_map.c @@ -10,6 +10,7 @@ /* */ /* ************************************************************************** */ +#include <libft.h> #include <cub3d.h> #include <stdint.h> @@ -54,7 +55,7 @@ void else if (map[y][x] == '2') ft_draw_square(scale + 9 + (x * (scale)), ft_y_offset(clist) - 9 + (y * (scale)), 0x0033ccff, clist); - else + else if (ft_ischarset("0LNSEW", map[y][x])) ft_draw_square(scale + 9 + (x * (scale)), ft_y_offset(clist) - 9 + (y * (scale)), 0x006afa6a, clist); x++; diff --git a/src/ft_get_res.c b/src/ft_get_res.c index 013b061..4447c1d 100644 --- a/src/ft_get_res.c +++ b/src/ft_get_res.c @@ -66,8 +66,8 @@ int8_t return (-1); wlist->x_size = ft_atoi(words[1]); wlist->y_size = ft_atoi(words[2]); - if (wlist->x_size <= 10 - || wlist->y_size <= 10) + if (wlist->x_size <= 50 || + wlist->y_size <= 50) { ft_sprintf(clist->errmsg, FT_ERR_RES_SMALL); return (-1); |