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
34
35
36
37
38
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_draw_skybox.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:22:57 by rbousset #+# #+# */
/* Updated: 2020/02/14 17:23:42 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include <cub3d.h>
#include <mlx.h>
void
ft_draw_skybox(t_cub *cl)
{
int offset;
offset = 640;
if (cl->plist.dir_x > 0)
offset = -offset;
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
mlx_put_image_to_window(cl->wlist.wlx, cl->wlist.winptr,
cl->tlist[7].img, offset * cl->plist.dir_y, -125);
}
|