-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
43 lines (39 loc) · 1.38 KB
/
main.c
File metadata and controls
43 lines (39 loc) · 1.38 KB
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
33
34
35
36
37
38
39
40
41
42
43
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dbreton <dbreton@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/12/02 10:27:23 by dbreton #+# #+# */
/* Updated: 2015/12/22 17:17:54 by dbreton ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
void get_usage(void)
{
write(2, "Usage: ./fractol [123]\n", 23);
write(2, "1\tMandelbrot Set\n", 17);
write(2, "2\tJulia Set\n", 12);
write(2, "3\tSierpinski carpet\n", 20);
}
int main(int ac, char **av)
{
t_mlx s;
s.max_ite = 30;
if (ac == 2)
{
s.type = av[1][0] - 48;
if (s.type <= 3 && s.type >= 1)
{
s.x_start = WIN_MAX_X / 2;
s.y_start = WIN_MAX_Y / 2;
win_init(s);
}
}
get_usage();
return (0);
}