aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_treat_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r--src/ft_treat_args.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c
index 4cc759e..19da836 100644
--- a/src/ft_treat_args.c
+++ b/src/ft_treat_args.c
@@ -29,21 +29,29 @@ uint8_t
return (0);
}
+static void
+ ft_init_macos_img(t_cub *clist)
+{
+ if (FT_OS == 1)
+ {
+ clist->img.img = mlx_new_image(clist->wlist.wlx,
+ clist->wlist.x_size, clist->wlist.y_size);
+ clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
+ &clist->img.sizeline, &clist->img.endian);
+ }
+}
+
uint8_t
- ft_use_args(int argc, const char *argv[], char *const envp[], t_cub *clist)
+ ft_use_args(int argc, const char *argv[], t_cub *clist)
{
- clist->envp = envp;
if (argc < 3)
{
if (ft_init_winptr(clist) < 0)
return (ft_exit(FT_RET_FAILED_MLX, clist));
- if (FT_OS == 1)
- {
- clist->img.img = mlx_new_image(clist->wlist.wlx,
- clist->wlist.x_size, clist->wlist.y_size);
- clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
- &clist->img.sizeline, &clist->img.endian);
- }
+ ft_wall_tex_init(clist);
+ ft_weap_tex_init(clist);
+ ft_num_tex_init(clist);
+ ft_init_macos_img(clist);
ft_draw_scene(clist);
if (clist->mlist.ismusic)
ft_enable_music(clist);