header norm check
This commit is contained in:
parent
91cd64dba8
commit
bd7baf18bd
1 changed files with 27 additions and 28 deletions
|
@ -6,7 +6,7 @@
|
|||
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/03/16 20:59:04 by gtertysh #+# #+# */
|
||||
/* Updated: 2017/03/24 14:00:01 by gtertysh ### ########.fr */
|
||||
/* Updated: 2017/03/24 19:58:43 by gtertysh ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -40,85 +40,84 @@
|
|||
|
||||
# define NUM_THREADS 24
|
||||
|
||||
|
||||
typedef struct s_complex
|
||||
typedef struct s_complex
|
||||
{
|
||||
long double rl;
|
||||
long double im;
|
||||
long double im;
|
||||
} t_complex;
|
||||
|
||||
typedef struct s_move
|
||||
typedef struct s_move
|
||||
{
|
||||
long double x;
|
||||
long double y;
|
||||
long double z;
|
||||
} t_move;
|
||||
|
||||
typedef struct s_color
|
||||
typedef struct s_color
|
||||
{
|
||||
int red;
|
||||
int grn;
|
||||
int blu;
|
||||
int red;
|
||||
int grn;
|
||||
int blu;
|
||||
} t_color;
|
||||
|
||||
typedef struct s_gradient
|
||||
typedef struct s_gradient
|
||||
{
|
||||
t_color grd[NUM_COLORS];
|
||||
t_color grd[NUM_COLORS];
|
||||
} t_gradient;
|
||||
|
||||
typedef struct s_frac_data
|
||||
typedef struct s_frac_data
|
||||
{
|
||||
t_complex com_const;
|
||||
t_gradient grd;
|
||||
t_move mov;
|
||||
int max_itr;
|
||||
int com_rl_im_change;
|
||||
int allow_mouse_change;
|
||||
int frac_type;
|
||||
int max_itr;
|
||||
int com_rl_im_change;
|
||||
int allow_mouse_change;
|
||||
int frac_type;
|
||||
} t_frac_data;
|
||||
|
||||
typedef struct s_image
|
||||
typedef struct s_image
|
||||
{
|
||||
void *ptr;
|
||||
char *data;
|
||||
int l_size;
|
||||
int end;
|
||||
int bpp;
|
||||
int bpp;
|
||||
} t_image;
|
||||
|
||||
typedef t_color (*frac_func)(t_frac_data *data, int x, int y);
|
||||
typedef t_color (*t_frac_func)(t_frac_data *data, int x, int y);
|
||||
|
||||
typedef struct s_fractol
|
||||
{
|
||||
void *mlx;
|
||||
void *win;
|
||||
t_frac_data *frac;
|
||||
frac_func fr_funcs[3];
|
||||
t_frac_func fr_funcs[3];
|
||||
int w_height;
|
||||
int w_width;
|
||||
t_image *img;
|
||||
} t_fractol;
|
||||
|
||||
typedef struct s_thread_data
|
||||
typedef struct s_thread_data
|
||||
{
|
||||
t_fractol fr;
|
||||
int y_start;
|
||||
int y_end;
|
||||
frac_func fractal_func;
|
||||
int y_start;
|
||||
int y_end;
|
||||
t_frac_func fractal_func;
|
||||
} t_thread_data;
|
||||
|
||||
void quit(t_fractol *fractol);
|
||||
void print_help(void);
|
||||
void parse_input(int ac, char **av);
|
||||
|
||||
t_color gradient(float value, t_gradient gradient);
|
||||
t_color gradient(float value, t_gradient gradient);
|
||||
t_gradient default_gradient(void);
|
||||
t_gradient random_gradient(void);
|
||||
|
||||
t_fractol *fractol_init(void *mlx, int frac_type);
|
||||
|
||||
int key_hook(int keycode, void *m);
|
||||
int mouse_move_hook( int x, int y, void *fr);
|
||||
int mouse_move_hook(int x, int y, void *fr);
|
||||
int mouse_button_hook(int btn, int x, int y, void *fr);
|
||||
|
||||
void put_pixel_to_image(int x, int y, t_color col, t_fractol *fr);
|
||||
|
@ -144,8 +143,8 @@ void move_down(t_fractol *fr);
|
|||
void reset(t_fractol *fr);
|
||||
void change_limit_down(t_fractol *fr);
|
||||
void change_limit_up(t_fractol *fr);
|
||||
int change_real(t_fractol *fr, int x, int *start_x);
|
||||
int change_imagianry(t_fractol *fr, int x, int *start_x);
|
||||
int change_real(t_fractol *fr, int x, int *start_x);
|
||||
int change_imagianry(t_fractol *fr, int x, int *start_x);
|
||||
void gradient_hook(t_fractol *fr);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue