-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfractol.h
74 lines (68 loc) · 2.05 KB
/
fractol.h
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
73
74
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fractol.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yagnaou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/02 16:04:54 by yagnaou #+# #+# */
/* Updated: 2022/03/09 17:30:38 by yagnaou ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FRACTOL_H
# define FRACTOL_H
# include "mlx.h"
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
# include <math.h>
# define WIN_SIZE 800
# define LEFT_KEY 123
# define RIGHT_KEY 124
# define DOWN_KEY 125
# define UP_KEY 126
# define ESC_KEY 53
# define MOUSE_UP 4
# define MOUSE_DOWN 5
typedef struct s_p
{
void *ptr;
void *win;
void *img;
float x;
float y;
float re;
float im;
float temp;
float zoom;
float c_re;
float c_im;
char *addr;
char *fractal;
int j;
int n;
int i;
int endian;
int line_length;
int bits_per_pixel;
} t_p;
void hooks(t_p *p);
void mandelbrot(t_p *p);
void error_phrase(void);
void burning_ship(t_p *p);
void create_image(t_p *p);
void create_window(t_p *p);
void julia(char *av, t_p *p);
void choose_fractale(char *av, t_p *p);
void my_putpixel(t_p *p, int x, int y, int color);
char *ft_strdup(const char *s1);
size_t ft_strlen(const char *str);
int iterate_ship(t_p *p);
int exit_when_close(void);
int iterate_mandelbrot(t_p *p);
int ft_strcmp(char *s1, char *s2);
int available_fractals(char **av);
int iterate_julia(char *av, t_p *p);
int arrow_move(int keycode, t_p *p);
int zoom(int keycode, int x, int y, t_p *p);
#endif