blob: 4d7b3412f1aa027ec346b118a41c56b640581033 (
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
|
#include <libft.h>
#include <mlx.h>
#include <cub3d.h>
int
main(void)
{
t_win *wlist;
if (!(wlist = ft_init_win()))
return (1);
if (!(wlist->clist = ft_init_cub()))
{
ft_memdel(wlist);
return (1);
}
ft_parse_map("map/map_one.cub", wlist);
if (ft_init_winlx(wlist) < 0)
return (ft_exit(3, wlist));
mlx_key_hook(wlist->winptr, ft_key_event, wlist);
ft_drawsquare(wlist, 80, 80);
mlx_loop(wlist->wlx);
return (0);
}
|