aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-01 23:55:26 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-01 23:55:26 +0100
commitfbdf87fcabdbc111508f5709347b88c8ce604011 (patch)
tree6140ee4bd2ed48a680fa23b0d0186f40a3f8a69e
parentNorme (diff)
download42-cub3d-fbdf87fcabdbc111508f5709347b88c8ce604011.tar.gz
42-cub3d-fbdf87fcabdbc111508f5709347b88c8ce604011.tar.bz2
42-cub3d-fbdf87fcabdbc111508f5709347b88c8ce604011.tar.xz
42-cub3d-fbdf87fcabdbc111508f5709347b88c8ce604011.tar.zst
42-cub3d-fbdf87fcabdbc111508f5709347b88c8ce604011.zip
Preparing music
Diffstat (limited to '')
-rw-r--r--Makefile2
-rw-r--r--map/lvl_one.cub2
-rw-r--r--media/sound/DEVANT-LES-KAISSONS.wavbin0 -> 40904126 bytes
-rwxr-xr-xmedia/sound/revelations.mp3bin7591392 -> 0 bytes
-rw-r--r--src/ft_music.c9
-rw-r--r--src/ft_treat_args.c2
-rw-r--r--src/main.c3
7 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 87f9309..5c57ff6 100644
--- a/Makefile
+++ b/Makefile
@@ -165,7 +165,7 @@ fclean: clean
re: fclean all
#--------------------------------------------------------------------------------------------------#
run: all
- @./${NAME} "map/map_one.cub"
+ @./${NAME} "map/lvl_one.cub"
#--------------------------------------------------------------------------------------------------#
.PHONY: all clean clean fclean re run default
#============================================== EOF ===============================================#
diff --git a/map/lvl_one.cub b/map/lvl_one.cub
index 433bfb7..0151dc4 100644
--- a/map/lvl_one.cub
+++ b/map/lvl_one.cub
@@ -12,6 +12,8 @@ F 50,190,124
L ./map/lvl_two.cub
LT ./media/img/crapaud.xpm
+MU ./media/sound/DEVANT-LES-KAISSONS.wav
+
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 L 0 0 0 0 1
1 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1
diff --git a/media/sound/DEVANT-LES-KAISSONS.wav b/media/sound/DEVANT-LES-KAISSONS.wav
new file mode 100644
index 0000000..469e6a9
--- /dev/null
+++ b/media/sound/DEVANT-LES-KAISSONS.wav
Binary files differ
diff --git a/media/sound/revelations.mp3 b/media/sound/revelations.mp3
deleted file mode 100755
index 2f13585..0000000
--- a/media/sound/revelations.mp3
+++ /dev/null
Binary files differ
diff --git a/src/ft_music.c b/src/ft_music.c
index 1be430b..3050f44 100644
--- a/src/ft_music.c
+++ b/src/ft_music.c
@@ -10,10 +10,19 @@
/* */
/* ************************************************************************** */
+#include <libft.h>
#include <cub3d.h>
+#include <stdlib.h>
void
ft_music(t_cub *cl)
{
+ /* char *cmd; */
+ /* uint8_t len; */
+
(void)cl;
+ /* if (FT_OS == 2) */
+ /* ft_sprintf(cmd, "aplay -f cd -t wav %s", cl->mlist->music_path); */
+ /* else {} */
+ /* system(cmd); */
}
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c
index fae81a0..aee2776 100644
--- a/src/ft_treat_args.c
+++ b/src/ft_treat_args.c
@@ -35,8 +35,8 @@ uint8_t
if (ft_init_winptr(clist) < 0)
return (ft_exit(FT_RET_FAILED_MLX, clist));
ft_draw_scene(clist);
- ft_hooks_and_loops(clist->wlist, clist);
/* ft_music(clist); */
+ ft_hooks_and_loops(clist->wlist, clist);
}
else if (argc == 3 && !ft_strncmp("--save", argv[2], 7))
{
diff --git a/src/main.c b/src/main.c
index 74c9b45..e92fdf1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,7 +27,6 @@ int
if (ft_init_winlx(clist) < 0)
return (ft_exit(FT_RET_FAILED_MLX, clist));
ft_wall_tex_init(clist);
- if (ft_use_args(argc, argv, clist) == FT_RET_FINE)
- return (FT_RET_FINE);
+ ft_use_args(argc, argv, clist);
return (FT_RET_FINE);
}