aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
blob: 7a6eb7928c226af90cdeb650ef881b8aebc4cee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <libft.h>
#include <mlx.h>
#include <cub3d.h>
#include <stdlib.h>

t_win
*ft_init_win(void)
{
	t_win	*wlist;

	wlist = (t_win*)malloc(sizeof(t_win));
	wlist->x_size = 800;
	wlist->y_size = 600;
	wlist->wlx = mlx_init();
	wlist->winptr = (void*)malloc(wlist->x_size * wlist->y_size);
	wlist->winptr = mlx_new_window(wlist->wlx, wlist->x_size, wlist->y_size, "Cub3D");
	ft_printf("Created window of size %dx%d\n", wlist->x_size, wlist->y_size);
	return (wlist);
}

t_cub
*ft_init_cub(void)
{
	t_cub	*clist;

	clist = (t_cub*)malloc(sizeof(t_cub));
	return (clist);
}