diff options
-rw-r--r-- | map/lvl_one.cub | 4 | ||||
-rw-r--r-- | map/lvl_two.cub | 2 | ||||
-rw-r--r-- | src/ft_exit.c | 5 | ||||
-rw-r--r-- | src/ft_music.c | 2 | ||||
-rw-r--r-- | src/ft_warp_level.c | 10 |
5 files changed, 16 insertions, 7 deletions
diff --git a/map/lvl_one.cub b/map/lvl_one.cub index 60296b2..330ffbc 100644 --- a/map/lvl_one.cub +++ b/map/lvl_one.cub @@ -15,8 +15,8 @@ LT ./media/img/crapaud.xpm MU ./media/sound/DEVANT-LES-KAISSONS.wav 1111111 -111111111111L00001 +111111111111L000W1 110101010101111101 -1E0000000000000001 +100000000000000001 110101010101010111 111111111111111111 diff --git a/map/lvl_two.cub b/map/lvl_two.cub index b0a1f22..6c76feb 100644 --- a/map/lvl_two.cub +++ b/map/lvl_two.cub @@ -12,7 +12,7 @@ F 50,190,124 L ./map/lvl_three.cub LT ./media/img/crapaud.xpm -MU ./media/sound/DEVANT-LES-KAISSONS.wav +MU ./media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav 111 101 diff --git a/src/ft_exit.c b/src/ft_exit.c index ca5201c..6726fb1 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -68,7 +68,10 @@ int if (clist->isoldmus && clist->wlist.inited) { pthread_cancel(clist->tid); - pthread_join(clist->tid, NULL); + if (FT_OS == 2) + pthread_join(clist->tid, NULL); + else + pthread_kill(clist->tid, SIGTERM); } ft_free_lists(clist); ft_printf("Exiting program\n"); diff --git a/src/ft_music.c b/src/ft_music.c index aec5e58..368cb05 100644 --- a/src/ft_music.c +++ b/src/ft_music.c @@ -24,7 +24,7 @@ void cl = (t_cub *)vargp; cl->isoldmus = 1; pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - while (1) + /* while (1) */ system(cl->mlist.music_cmd); return (NULL); } diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 808b346..cda89b0 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -67,14 +67,20 @@ static void if (isoldmus && !cl->mlist.ismusic) { pthread_cancel(cl->tid); - pthread_join(cl->tid, NULL); + if (FT_OS == 2) + pthread_join(cl->tid, NULL); + else + pthread_kill(cl->tid, SIGTERM); cl->isoldmus = 0; } else if (isoldmus && cl->mlist.ismusic && ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1)) { pthread_cancel(cl->tid); - pthread_join(cl->tid, NULL); + if (FT_OS == 2) + pthread_join(cl->tid, NULL); + else + pthread_kill(cl->tid, SIGTERM); pthread_create(&cl->tid, NULL, ft_music_thread, cl); } else if (isoldmus && cl->mlist.ismusic |