diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 00:09:11 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 00:09:11 +0100 |
commit | fbd69257b509d3374573282ee08f5d9fc9ed4095 (patch) | |
tree | 28b9ab225e910a8ae279623b08152e310431242c /src/ft_init_winlx.c | |
parent | Nice and working (diff) | |
download | 42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.gz 42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.bz2 42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.xz 42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.zst 42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.zip |
It ain't much but it's honest work
Diffstat (limited to '')
-rw-r--r-- | src/ft_init_winlx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c new file mode 100644 index 0000000..0e272fd --- /dev/null +++ b/src/ft_init_winlx.c @@ -0,0 +1,18 @@ +#include <libft.h> +#include <mlx.h> +#include <cub3d.h> +#include <stdlib.h> + +int +ft_init_winlx(t_win *wlist) +{ + if (!(wlist->wlx = mlx_init())) + return (-1); + if (!(wlist->winptr = (void*)malloc(wlist->x_size * wlist->y_size))) + return (-1); + if (!(wlist->winptr = mlx_new_window(wlist->wlx, wlist->x_size,\ + wlist->y_size, "Cub3D"))) + return (-1); + ft_printf("Created window of size %dx%d\n", wlist->x_size, wlist->y_size); + return (0); +} |