-
Notifications
You must be signed in to change notification settings - Fork 0
/
fractol.h
143 lines (133 loc) · 3.49 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fractol.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jgourdin <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/09/20 01:39:03 by jgourdin #+# #+# */
/* Updated: 2017/10/17 03:06:53 by jgourdin ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FRACTOL_H
# define FRACTOL_H
# include <math.h>
# include <stdlib.h>
# include <fcntl.h>
# include <stdio.h>
# include "./minilibx_macos/mlx.h"
# include "./libft/libft.h"
# include <time.h>
# define FLAG env->info.flg
# define INIT env->mlx.init
# define IMAGE env->mlx.image
# define DATA env->mlx.data
# define SIZE env->mlx.size_line
# define BPP env->mlx.bpp
# define ENDIAN env->mlx.endian
# define WIN env->mlx.window
# define HEIGHT env->info.hauteur
# define WIDTH env->info.largeur
# define ITT env->info.itt
# define BASEX env->info.base_x
# define BASEY env->info.base_y
# define C_R env->calc.c_r
# define C_I env->calc.c_i
# define Z_R env->calc.z_r
# define Z_I env->calc.z_i
# define I env->calc.i
# define ZOOM env->info.zoom
# define TMPI env->calc.tmpi
# define TMPR env->calc.tmpr
# define COLOR env->info.color
# define TIME env->info.time
# define T_TIME env->info.time_tmp
# define ESC 53
# define M_DOWN 4
# define M_UP 5
# define M_LEFT 7
# define M_RIGHT 6
# define UP 126
# define DOWN 125
# define RIGHT 124
# define LEFT 123
# define PLUS 69
# define MINUS 78
# define MOTION 6
# define MASK 0
# define IM 13
# define IP 1
# define TYPE env->info.type
# define PAUSE env->info.pause
# define FRAME env->info.time_tmp
typedef struct s_mlx
{
void *init;
void *window;
void *image;
char *data;
int bpp;
int size_line;
int endian;
} t_mlx;
typedef struct s_info
{
int flg;
double largeur;
double hauteur;
int itt;
double base_x;
double base_y;
double zoom;
int color;
double time;
int pause;
double time_tmp;
char *type;
int j;
int menu;
} t_info;
typedef struct s_calc
{
double z_i;
double tmpi;
double tmpr;
double z_r;
double c_i;
double c_r;
int i;
} t_calc;
typedef struct s_choose
{
void *img;
void *win;
char *data;
int bpp;
char *file;
int sizel;
int endian;
int hauteur;
int largeur;
} t_choose;
typedef struct s_fract
{
t_info info;
t_mlx mlx;
t_calc calc;
t_choose texture;
} t_fract;
void chooseurfighter(t_fract *env);
int gere_expose2(t_fract *env);
void mandel(int x, int y, t_fract *env);
void ft_select(int x, int y, t_fract *env);
void lauch_factory(t_fract *env);
void init(t_fract **env);
void pixel_to_image(int x, int y, t_fract *env);
int k_hook(int keycode, t_fract *env);
int gere_expose(t_fract *env);
void give_me_ur_id(t_fract *env);
void ft_hud(t_fract *env);
void birdofprey(int x, int y, t_fract *env);
void burning_turn_down(int x, int y, t_fract *env);
void juliabird(int x, int y, t_fract *env);
#endif