aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-03-09 23:08:39 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-03-09 23:08:39 +0100
commita4eae07949127cbdfa9030ad086c1d0edfa8e1f5 (patch)
tree419651274887318990adb6e434d5f5bcfb835340 /src/ft_tex_init.c
parentgang_2 (diff)
parentMap update (diff)
download42-cub3d-a4eae07949127cbdfa9030ad086c1d0edfa8e1f5.tar.gz
42-cub3d-a4eae07949127cbdfa9030ad086c1d0edfa8e1f5.tar.bz2
42-cub3d-a4eae07949127cbdfa9030ad086c1d0edfa8e1f5.tar.xz
42-cub3d-a4eae07949127cbdfa9030ad086c1d0edfa8e1f5.tar.zst
42-cub3d-a4eae07949127cbdfa9030ad086c1d0edfa8e1f5.zip
Merge branch 'skybox'
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r--src/ft_tex_init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index 38e4c77..4cbdf73 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -62,6 +62,13 @@ static void
ft_get_floor_tex(cl);
if (cl->mlist.isctex)
ft_get_ceil_tex(cl);
+ if (cl->mlist.isskybox)
+ {
+ cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx,
+ cl->mlist.skybox_path, &cl->tlist[7].img_w, &cl->tlist[7].img_h);
+ cl->tlist[7].ptr = mlx_get_data_addr(cl->tlist[7].img,
+ &cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian);
+ }
cl->walltexgood = 1;
}