From eff45a482b40ddb5857adce9f6740282b04ab4a2 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 15 Apr 2020 16:54:12 +0200 Subject: Pretty compliant but mutex problems --- src/ft_bad_boy_actions.c | 6 +++--- src/ft_draw_scene.c | 4 ++-- src/ft_sfx_weapon_one.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ft_bad_boy_actions.c b/src/ft_bad_boy_actions.c index 26d294b..fb2cdb7 100644 --- a/src/ft_bad_boy_actions.c +++ b/src/ft_bad_boy_actions.c @@ -73,10 +73,10 @@ void i = 0; while (i < cl->mlist.sprite_nbr[13]) { - if (FT_OS == 1) - r = rand() % 4; - else + if (FT_OS == 2) r = random() % 4; + else + r = rand() % 4; if (cl->bad_boy[i].does == 2 && cl->bad_boy[i].sleep == 0) { cl->sfx[15].sfx_play(cl->sfx); diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c index 36cdf4f..ad6b373 100644 --- a/src/ft_draw_scene.c +++ b/src/ft_draw_scene.c @@ -52,7 +52,7 @@ static int8_t void ft_draw_scene(t_cub *clist) { - if (FT_OS == 2) + if (FT_OS == 2 || FT_OS == 3) { clist->img.img = mlx_new_image(clist->wlist.wlx, clist->wlist.x_size, clist->wlist.y_size); @@ -67,7 +67,7 @@ void ft_draw_hud(clist); mlx_put_image_to_window(clist->wlist.wlx, clist->wlist.winptr, clist->img.img, 0, 0); - if (FT_OS == 2) + if (FT_OS == 2 || FT_OS == 3) mlx_destroy_image(clist->wlist.wlx, clist->img.img); if (clist->ishud) { diff --git a/src/ft_sfx_weapon_one.c b/src/ft_sfx_weapon_one.c index 2cc8dcc..6cecc4e 100644 --- a/src/ft_sfx_weapon_one.c +++ b/src/ft_sfx_weapon_one.c @@ -14,6 +14,7 @@ #include #include +#include void *ft_sfx_w_one_load_thread(void *vargp) { -- cgit v1.2.3