infos affichees ajout zoom et deplacement

This commit is contained in:
hugogogo
2021-07-24 10:42:04 +02:00
parent 99c95c1cf1
commit 5474a870f0
10 changed files with 31 additions and 20 deletions

View File

@@ -24,11 +24,11 @@ t_fdf *init_fdf(t_fdf *fdf)
fdf->win_size_y = fdf->map_size_y + 2 * fdf->margin;
fdf->img_size_x = fdf->win_size_x;
fdf->img_size_y = fdf->win_size_y;
fdf->rot_x = 0;
fdf->rot_y = 0;
fdf->rot_x = -30;
fdf->rot_y = -45;
fdf->mov_x = 0;
fdf->mov_y = 0;
fdf->zoom = 0;
fdf->zoom = -5;
fdf->mlx_ptr = mlx_init();
fdf->win_ptr = mlx_new_window(fdf->mlx_ptr, fdf->win_size_x,
fdf->win_size_y, "test");
@@ -40,12 +40,14 @@ t_fdf *init_fdf(t_fdf *fdf)
return (fdf);
}
int main(void)
int main(int ac, char **av)
{
t_fdf *fdf;
if (ac != 1)
return (0);
fdf = malloc(sizeof(t_fdf));
fdf->map = parse_map(fdf);
fdf->map = parse_map(fdf, av);
fdf = init_fdf(fdf);
mlx_hook(fdf->win_ptr, 2, 1L << 0, keypress, fdf);
mlx_hook(fdf->win_ptr, 17, 1L << 17, shut_down, fdf);