zoom fonctionne sauf z

This commit is contained in:
hugogogo
2021-07-23 15:06:56 +02:00
parent 964c83478d
commit b9f02a20f3
11 changed files with 281 additions and 272 deletions

View File

@@ -5,6 +5,7 @@
# include <mlx.h>
# include <unistd.h> // for sleep()
# include <math.h> // for M_PI
# include <stdio.h> // for printf()
typedef struct s_fdf
{
@@ -31,11 +32,25 @@ typedef struct s_fdf
int mov_x;
int mov_y;
int max_z;
int zoom;
int img_bpp;
int img_sizel;
int img_endian;
} t_fdf;
t_fdf *init_fdf(void);
int print_keycode(int keycode);
int shut_down(t_fdf *fdf);
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 rotation_state(t_fdf *fdf);
int **parse_map(t_fdf *fdf);
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);
# define ESCAPE 65307
# define UP 65362
# define DOWN 65364