-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48b3c49
commit 4a49ddc
Showing
9 changed files
with
85 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# By: rabougue <[email protected]> +#+ +:+ +#+ # | ||
# +#+#+#+#+#+ +#+ # | ||
# Created: 2015/12/10 19:16:51 by rabougue #+# #+# # | ||
# Updated: 2016/05/07 17:03:23 by rabougue ### ########.fr # | ||
# Updated: 2016/05/07 17:18:48 by rabougue ### ########.fr # | ||
# # | ||
# **************************************************************************** # | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/03/09 12:52:14 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 16:54:32 by rabougue ### ########.fr */ | ||
/* Updated: 2016/05/07 19:21:08 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -59,8 +59,6 @@ typedef struct s_all | |
unsigned char g; | ||
unsigned char b; | ||
unsigned char o; | ||
double temp_x; | ||
double temp_y; | ||
unsigned char r2; | ||
unsigned char g2; | ||
unsigned char b2; | ||
|
@@ -70,83 +68,90 @@ typedef struct s_all | |
void (*zoom_tab[8])(struct s_all *); | ||
} t_all; | ||
/* | ||
** error.c | ||
** call_fractal.c | ||
*/ | ||
void call_fractal_1(char **argv, t_all *all); | ||
void call_fractal_2(char **argv, t_all *all); | ||
void call_fractal_3(char **argv, t_all *all); | ||
void call_fractal_4(char **argv, t_all *all); | ||
/* | ||
** check_fractal.c | ||
*/ | ||
int check_arguments(void); | ||
int check_fractal_init(t_all *all); | ||
int check_fractal(int keycode, t_all *all); | ||
/* | ||
** fractal.c | ||
** draw_fractal_1.c | ||
*/ | ||
void draw_mandelbrot(t_all *all); | ||
void draw_julia(t_all *all); | ||
void draw_ship(t_all *all); | ||
void draw_tricorne(t_all *all); | ||
void draw_bird(t_all *all); | ||
/* | ||
** draw_fractal_1.c | ||
*/ | ||
void draw_space(t_all *all); | ||
void draw_pylone(t_all *all); | ||
void draw_celtic(t_all *all); | ||
/* | ||
** init.c | ||
** error.c | ||
*/ | ||
void init_mlx(t_all *all); | ||
void init_julia(t_all *all); | ||
void init_mandelbrot(t_all *all); | ||
void init_ship(t_all *all); | ||
void init_tricorne(t_all *all); | ||
void init_bird(t_all *all); | ||
void init_space(t_all *all); | ||
void init_pylone(t_all *all); | ||
void check_arguments(void); | ||
/* | ||
** init_event.c | ||
*/ | ||
void init_zoom_tab(t_all *all); | ||
void init_event(t_all *all); | ||
void color_fractal(t_all *all); | ||
void move(t_all *all, double x, double y); | ||
/* | ||
** loop_fractal.c | ||
** init_fractal_1.c | ||
*/ | ||
void loop_mandelbrot(t_all *all); | ||
void loop_julia(t_all *all); | ||
void loop_ship(t_all *all); | ||
void loop_tricorne(t_all *all); | ||
void loop_bird_of_pray(t_all *all); | ||
void loop_pylone(t_all *all); | ||
void init_mlx(t_all *all); | ||
void init_mandelbrot(t_all *all); | ||
void init_julia(t_all *all); | ||
void init_ship(t_all *all); | ||
void init_tricorne(t_all *all); | ||
/* | ||
** init_fractal_2.c | ||
*/ | ||
void init_bird(t_all *all); | ||
void init_space(t_all *all); | ||
void init_pylone(t_all *all); | ||
void init_celtic(t_all *all); | ||
/* | ||
** key_hook.c | ||
*/ | ||
void clear_image(t_all *all); | ||
void draw_cross(t_all *all, int x, int y, int color); | ||
int j_slide(int null, double x, int y, t_all *all); | ||
int save_stat(t_all *all); | ||
/* | ||
** mouse_hook.c | ||
*/ | ||
int mouse_hook_zoom(int button, int y, int x, t_all *all); | ||
int mouse_hook_j(int button, int y, int x, t_all *all); | ||
int mouse_hook_ship(int button, int y, int x, t_all *all); | ||
int mouse_hook_tricorne(int button, int y, int x, t_all *all); | ||
/* | ||
** key_hook_fractal_1.c | ||
*/ | ||
int key_hook_fractal_1(int key, t_all *all, void(*ft)(t_all *)); | ||
int key_hook_julia(int keycode, t_all *all); | ||
int key_hook_fractal_2(int key, t_all *all, void(*ft)(t_all *)); | ||
int key_hook_fractal_3(int key, t_all *all, void(*ft)(t_all *)); | ||
int check_fractal(int keycode, t_all *all); | ||
int check_fractal_init(t_all *all); | ||
/* | ||
** call_fractal.c | ||
** loop_fractal_1.c | ||
*/ | ||
void call_fractal_1(char **argv, t_all *all); | ||
void call_fractal_2(char **argv, t_all *all); | ||
void call_fractal_3(char **argv, t_all *all); | ||
void call_fractal_4(char **argv, t_all *all); | ||
void loop_mandelbrot(t_all *all); | ||
void loop_ship(t_all *all); | ||
void loop_tricorne(t_all *all); | ||
void loop_bird_of_pray(t_all *all); | ||
void loop_pylone(t_all *all); | ||
/* | ||
** loop_fractal_1.c | ||
*/ | ||
void loop_celtic(t_all *all); | ||
/* | ||
** mouse_hook.c | ||
*/ | ||
int mouse_hook_zoom(int button, int y, int x, t_all *all); | ||
/* | ||
** print_point.c.c | ||
** print_point.c | ||
*/ | ||
void ft_pixel_put_to_image(t_all *all); | ||
void ft_pixel_put_to_image_colors(t_all *all); | ||
void move(t_all *all, double x, double y); | ||
void loop_celtic(t_all *all); | ||
void init_celtic(t_all *all); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
# **************************************************************************** # | ||
# # | ||
# ::: :::::::: # | ||
# menu.sh :+: :+: :+: # | ||
# +:+ +:+ +:+ # | ||
# By: rabougue <[email protected]> +#+ +:+ +#+ # | ||
# +#+#+#+#+#+ +#+ # | ||
# Created: 2016/05/07 19:21:55 by rabougue #+# #+# # | ||
# Updated: 2016/05/07 19:22:52 by rabougue ### ########.fr # | ||
# # | ||
# **************************************************************************** # | ||
|
||
echo "\033[32m**********************************************************\033[0m" | ||
echo "\033[32m* Fracto'ol by Rabougue *\033[0m" | ||
echo "\033[32m* Fracto'ol by Rabougue *\033[0m" | ||
echo "\033[32m**********************************************************\033[0m" | ||
echo "\033[32m* Esc = Exit *\033[0m" | ||
echo "\033[32m* + = Luminosity + *\033[0m" | ||
|
@@ -22,5 +34,5 @@ echo "\033[32m* M = Music On *\033[0m" | |
echo "\033[32m* N = Music Off *\033[0m" | ||
echo "\033[32m* \033[31mJulia Only: \033[32m*\033[0m" | ||
echo "\033[32m* F1 = Red cross *\033[0m" | ||
echo "\033[32m* Space = Pause *\033[0m" | ||
echo "\033[32m* Space = Pause variation *\033[0m" | ||
echo "\033[32m**********************************************************\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* fractal.c :+: :+: :+: */ | ||
/* draw_fractal_1.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/04/28 21:15:53 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 16:49:53 by rabougue ### ########.fr */ | ||
/* Created: 2016/05/07 19:08:41 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 19:08:54 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,22 @@ | |
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/04/24 23:44:51 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 16:55:22 by rabougue ### ########.fr */ | ||
/* Updated: 2016/05/07 18:48:25 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "../includes/fractol.h" | ||
|
||
int check_arguments(void) | ||
void check_arguments(void) | ||
{ | ||
ft_putendl("Usage : "); | ||
ft_putendl("./fractol -mandelbrot\n./fractol -julia"); | ||
ft_putendl("./fractol -burning_ship\n./fractol -tricorne"); | ||
ft_putendl("./fractol -bird_of_prey\n./fractol -space"); | ||
ft_putendl("./fractol -pylone\n./fractol -celtic"); | ||
ft_putendl_fd("\033[31mUsage : \033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-mandelbrot\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-julia\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-burning_ship\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-tricorne\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-bird_of_prey\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-space\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-pylone\033[0m", 2); | ||
ft_putendl_fd("./fractol \033[32m-celtic\033[0m", 2); | ||
exit(EXIT_FAILURE); | ||
return (EXIT_SUCCESS); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* init.c :+: :+: :+: */ | ||
/* init_fractal_1.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/04/27 09:15:20 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 17:01:11 by rabougue ### ########.fr */ | ||
/* Created: 2016/05/07 19:10:27 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 19:10:32 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* init_2.c :+: :+: :+: */ | ||
/* init_fractal_2.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/05/05 21:40:06 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 17:01:26 by rabougue ### ########.fr */ | ||
/* Created: 2016/05/07 19:14:21 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 19:14:22 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/04/24 01:05:06 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/06 22:57:30 by rabougue ### ########.fr */ | ||
/* Updated: 2016/05/07 18:56:40 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: rabougue <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2016/05/04 17:13:49 by rabougue #+# #+# */ | ||
/* Updated: 2016/05/07 17:07:35 by rabougue ### ########.fr */ | ||
/* Updated: 2016/05/07 19:01:34 by rabougue ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -72,7 +72,7 @@ int key_hook_fractal_2(int keycode, t_all *all, void (*function)(t_all*)) | |
else if (keycode == KEY_M) | ||
system("afplay sound/Sound.mp3&"); | ||
else if (keycode == KEY_N) | ||
system("killall afplay"); | ||
system("killall afplay 2>/dev/null"); | ||
function(all); | ||
key_hook_fractal_3(keycode, all, function); | ||
return (0); | ||
|
@@ -96,7 +96,7 @@ int key_hook_fractal_3(int keycode, t_all *all, void (*function)(t_all*)) | |
check_fractal_init(all); | ||
else if (keycode == KEY_ESC) | ||
{ | ||
system("killall afplay"); | ||
system("killall afplay 2>/dev/null"); | ||
mlx_destroy_window(all->mlx_ptr, all->win_ptr); | ||
exit(EXIT_SUCCESS); | ||
} | ||
|