From fbd69257b509d3374573282ee08f5d9fc9ed4095 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 24 Jan 2020 00:09:11 +0100 Subject: It ain't much but it's honest work --- src/ft_init_winlx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/ft_init_winlx.c (limited to 'src/ft_init_winlx.c') 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 +#include +#include +#include + +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); +} -- cgit v1.2.3