diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-21 19:36:09 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-21 19:36:09 +0100 |
commit | 06ad364a0dad99bc330ac5d4ec64cc6d44bbed25 (patch) | |
tree | 71c34fe71bf31b91941122a1a3ceccedf47ad8e6 /src/main.c | |
parent | Makefile update (diff) | |
parent | add threaded music (diff) | |
download | 42-cub3d-06ad364a0dad99bc330ac5d4ec64cc6d44bbed25.tar.gz 42-cub3d-06ad364a0dad99bc330ac5d4ec64cc6d44bbed25.tar.bz2 42-cub3d-06ad364a0dad99bc330ac5d4ec64cc6d44bbed25.tar.xz 42-cub3d-06ad364a0dad99bc330ac5d4ec64cc6d44bbed25.tar.zst 42-cub3d-06ad364a0dad99bc330ac5d4ec64cc6d44bbed25.zip |
Merge branch 'sprites' of gitlab.com into sprites
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -15,17 +15,30 @@ #include <cub3d.h> #include <stddef.h> #include <unistd.h> +#include <pthread.h> +#include <stdlib.h> + +void + *ft_zik(void *vargp) +{ + (void)vargp; + system("afplay revelations.mp3"); + return NULL; +} int main(int argc, const char *argv[]) { t_cub *clist; + pthread_t thread_id; if (argc < 2) { ft_dprintf(STDERR_FILENO, "Error\n\033[1;31mNo map selected\n\033[0m"); return (1); } + pthread_create(&thread_id, NULL, ft_zik, NULL); + pthread_join(thread_id, NULL); if (ft_init_cub3d(&clist) < 0) return (2); ft_parse_map(argv[1], clist); |