diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-28 15:43:11 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-28 15:43:11 +0100 |
commit | a3bbca59528b7c74369988b480e83b66224638ef (patch) | |
tree | 44eac6d8b8307976d53fda4733e10b4b3f1be531 | |
parent | ok (diff) | |
download | 42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.gz 42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.bz2 42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.xz 42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.zst 42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.zip |
Removed skybox shit
-rw-r--r-- | src/ft_init_funptr.c | 2 | ||||
-rw-r--r-- | src/ft_select_get.c | 4 | ||||
-rw-r--r-- | src/ft_tex_init.c | 24 |
3 files changed, 16 insertions, 14 deletions
diff --git a/src/ft_init_funptr.c b/src/ft_init_funptr.c index 8702277..99983c6 100644 --- a/src/ft_init_funptr.c +++ b/src/ft_init_funptr.c @@ -28,6 +28,7 @@ void ft_sprintf(clist->ref[9], "LT"); ft_sprintf(clist->ref[10], "MU"); ft_sprintf(clist->ref[11], "SH"); + ft_sprintf(clist->ref[12], "C"); ft_sprintf(clist->ref[13], "T"); ft_sprintf(clist->ref[14], "S3"); ft_sprintf(clist->ref[15], "S4"); @@ -60,5 +61,6 @@ void clist->get_ptr[9] = ft_get_tex_nl; clist->get_ptr[10] = ft_get_music; clist->get_ptr[11] = ft_get_darkness; + clist->get_ptr[12] = ft_get_c_color; clist->get_ptr[13] = ft_get_traps; } diff --git a/src/ft_select_get.c b/src/ft_select_get.c index 2c37b8f..d311528 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -36,8 +36,8 @@ static int8_t else if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1) || (clist->f_rgb.b != -1))) return (-1); - else if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1) - || (clist->c_rgb.b != -1))) + else if ((ret == 7 || ret == 12) && ((clist->c_rgb.r != -1) || + (clist->c_rgb.g != -1) || (clist->c_rgb.b != -1))) return (-1); return (ret); } diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index e2fef5e..1a58421 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -84,6 +84,13 @@ static void static void ft_wall_tex_init_next_bonus(t_cub *cl) { + if (cl->mlist.istraps) + { + cl->tlist[15].img = mlx_xpm_file_to_image(cl->wlist.wlx, + cl->mlist.traps_path, &cl->tlist[15].img_w, &cl->tlist[15].img_h); + cl->tlist[15].ptr = mlx_get_data_addr(cl->tlist[15].img, + &cl->tlist[15].bpp, &cl->tlist[15].sizeline, &cl->tlist[15].endian); + } if (cl->mlist.isheals) { cl->tlist[17].img = mlx_xpm_file_to_image(cl->wlist.wlx, @@ -91,13 +98,6 @@ static void cl->tlist[17].ptr = mlx_get_data_addr(cl->tlist[17].img, &cl->tlist[17].bpp, &cl->tlist[17].sizeline, &cl->tlist[17].endian); } - else if (cl->mlist.isctex) - { - cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx, - cl->mlist.ce_tex_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); - } ft_wall_tex_init_more_bonus(cl); } @@ -118,12 +118,12 @@ static void cl->tlist[6].ptr = mlx_get_data_addr(cl->tlist[6].img, &cl->tlist[6].bpp, &cl->tlist[6].sizeline, &cl->tlist[6].endian); } - if (cl->mlist.istraps) + if (cl->mlist.isctex) { - cl->tlist[15].img = mlx_xpm_file_to_image(cl->wlist.wlx, - cl->mlist.traps_path, &cl->tlist[15].img_w, &cl->tlist[15].img_h); - cl->tlist[15].ptr = mlx_get_data_addr(cl->tlist[15].img, - &cl->tlist[15].bpp, &cl->tlist[15].sizeline, &cl->tlist[15].endian); + cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx, + cl->mlist.ce_tex_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); } ft_wall_tex_init_next_bonus(cl); } |