a la norme et sans leaks

This commit is contained in:
hugogogo
2021-07-25 14:56:05 +02:00
parent e4b4f5e751
commit 463ce19ce3
5 changed files with 40 additions and 26 deletions

View File

@@ -3,12 +3,10 @@
# include "../libft/includes/libft.h"
# include <mlx.h>
# include <unistd.h> // for sleep()
# include <math.h> // for M_PI
# include <stdio.h> // for printf()
# include <fcntl.h> // for open
typedef struct s_fdf
typedef struct s_fdf
{
void *mlx_ptr;
void *win_ptr;
@@ -40,22 +38,35 @@ typedef struct s_fdf
int img_endian;
} t_fdf;
// fdf.c
int main(int ac, char **av);
void init_fdf(t_fdf *fdf);
void init_offset(t_fdf *fdf);
void init_server(t_fdf *fdf);
int print_keycode(int keycode);
int shut_down(t_fdf *fdf);
// draw.c
void draw_image(t_fdf *fdf);
void draw_pixel(t_fdf *fdf, int x, int y, int color);
void draw_color_pixel(t_fdf *fdf, int new_x, int new_y, int z);
int keypress(int keycode, t_fdf *fdf);
void keypress_more(int keycode, t_fdf *fdf);
void position_state(t_fdf *fdf);
int is_color(char *color);
int **parse_map(t_fdf *fdf, int fd);
int *new_coordinates(t_fdf *fdf, int i, int j);
void draw_lines(t_fdf *fdf, int *start, int *end);
void draw_grid(t_fdf *fdf, int i, int j);
void draw_lines(t_fdf *fdf, int *start, int *end);
void draw_color_pixel(t_fdf *fdf, int new_x, int new_y, int z);
void draw_pixel(t_fdf *fdf, int x, int y, int color);
// keypress.c
void keypress_more(int keycode, t_fdf *fdf);
int keypress(int keycode, t_fdf *fdf);
// modifs.c
int *new_coordinates(t_fdf *fdf, int i, int j);
void position_state(t_fdf *fdf);
int print_keycode(int keycode);
// parse.c
void z_amplitude(t_fdf*fdf, int i);
int **split_to_map(t_fdf *fdf, char *raw);
int is_color(char *color);
void size_map(t_fdf *fdf, char *raw, int height);
int **parse_map(t_fdf *fdf, int fd);
# define ESCAPE 65307
# define UP 65362