blob: cd9b1620e01e9da7c195dc327f192d85ee5d1040 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <libft.h>
#include <cub3d.h>
int8_t
ft_get_screen_size(t_win *wlist)
{
char **words;
if (!(words = ft_split(FT_SCR_SIZE, 'x')))
return (-1);
if (!(*words + 0) || !(*(words + 1)) || (*(words + 2)))
return (-1);
wlist->x_max_size = ft_atoi(words[0]);
wlist->y_max_size = ft_atoi(words[1]);
return (ft_free_words(words));
}
|