-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathb_fdf_bonus.c
33 lines (30 loc) · 1.44 KB
/
b_fdf_bonus.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* b_fdf_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/28 12:19:15 by nkawaguc #+# #+# */
/* Updated: 2024/10/29 01:04:01 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#include "b_fdf_bonus.h"
void fdf(t_map *map)
{
t_data data;
data.mlx = mlx_init_wrap();
data.win = mlx_new_window_wrap(data.mlx, WIN_WIDTH, WIN_HEIGHT, WIN_TITLE);
data.img = mlx_new_image_wrap(data.mlx, WIN_WIDTH, WIN_HEIGHT);
data.addr = (int *)mlx_get_data_addr(data.img, &data.bpp,
&data.size_l, &data.endian);
data.map = map;
isometric(&data, map);
draw_map(&data, map);
mlx_put_image_to_window(data.mlx, data.win, data.img, 0, 0);
hook(&data);
ft_putstr_fd(USAGE_TO_DISPLAY, STDOUT_FILENO);
mlx_loop(data.mlx);
mlx_destroy_display(data.mlx);
free(data.mlx);
}