-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
32 lines (29 loc) · 1.35 KB
/
main.c
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
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dvan-der <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/15 08:23:54 by dvan-der #+# #+# */
/* Updated: 2022/02/09 15:02:56 by dvan-der ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
int main(int argc, char *argv[])
{
t_fdf fdf;
if (argc == 2)
{
fdf.mlx_ptr = mlx_init();
fdf.win_ptr = mlx_new_window(fdf.mlx_ptr, \
SCREEN_W, SCREEN_H, "FDF");
fdf.img = mlx_new_image(fdf.mlx_ptr, SCREEN_W, SCREEN_H);
fdf.addr = mlx_get_data_addr(fdf.img, &(fdf.bits_per_pixel), \
&(fdf.line_length), &(fdf.endian));
if (ft_machine(argv, &fdf))
write(2, "Sorry, incorrect input...\n", 26);
}
else
write(2, "Sorry, incorrect input...\n", 26);
}