-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
73 lines (61 loc) · 2.16 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kakiba <kotto555555@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/31 19:45:21 by kakiba #+# #+# */
/* Updated: 2023/01/04 06:51:46 by kakiba ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void drow_fractol(t_fractol *fractol)
{
fractol->fract_fanc(fractol);
}
int main(int argc, char *argv[])
{
t_fractol fractol;
handle_argument(&fractol, argc, argv);
printf("[argv done]\n");
init_mlx_img(&fractol);
printf("[init done]\n");
init_hock(&fractol);
printf("[hock prepared]\n");
drow_fractol(&fractol);
printf("[drowed]\n");
mlx_loop(fractol.mlx_server);
return (0);
}
void my_mlx_pixel_put(t_img_param *img_param, int x, int y, int color)
{
char *dst;
// printf("x:[%d], y[%d], color[%d]\n", x, y, color);
dst = img_param->address + (y * img_param->line_length + x * (img_param->bits_per_pixel / 8));
*(unsigned int*)dst = color;
}
// int my_move_mouse(int x, int y , t_vars *vars)
// {
// printf("x:[%d], y:[%d]wwwwwwww\n", x, y);
// }
// int check_man(t_complex c, t_complex pre, int t)
// {
// 立方体?!
// t_complex z;
// z.r = pre.i + c.i;
// z.i = pre.r + c.r;
// double d = sqrt(z.r * z.r + z.i * z.i);
// if (d > 2)
// return (0);
// else if (t < 4)
// return (check_man(c, z, ++t));
// else
// return (1);
// }
// 1111111 1111111 11111110 11111111 Mask
// 11101010 0101011 01010101 10101101 Key
// 00000000 0000000 00000000 00000101 Key
// 00000000 0000000 00000000 00000001 result
// &
// 00000000 0000000 00000000 00000000 Result