diff options
-rw-r--r-- | inc/cub3d_defines.h | 11 | ||||
-rw-r--r-- | map/map_five.cub | 10 | ||||
-rw-r--r-- | src/ft_get_music.c | 15 |
3 files changed, 19 insertions, 17 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 3f32fe3..c84f6c1 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -77,6 +77,15 @@ enum # endif /* +** ====== MUSIC CMD ====== +*/ +# if FT_OS == 1 +# define FT_MUS_CMD "aplay -f cd -t wav -q %s" +# else +# define FT_MUS_CMD "" +# endif + +/* ** ====== MOVE SPEED ====== */ @@ -85,7 +94,7 @@ enum # define FT_ROT_SPEED 0.09 /* -** ====== MOVE SPEED ====== +** ====== COLLISION ====== */ # define FT_COLL_MULT 0.225 diff --git a/map/map_five.cub b/map/map_five.cub index 8842b43..cea7045 100644 --- a/map/map_five.cub +++ b/map/map_five.cub @@ -1,10 +1,10 @@ R 1440 900 -NO ./path_to_the_north_texture -SO ./path_to_the_south_texture -WE ./path_to_the_west_texture -EA ./path_to_the_east_texture +NO ./media/img/terre.xpm +SO ./media/img/terre.xpm +WE ./media/img/terre.xpm +EA ./media/img/terre.xpm -S ./path_to_the_sprite_texture +S ./media/img/crapaud.xpm F 220,100,0 C 225,30,0 diff --git a/src/ft_get_music.c b/src/ft_get_music.c index eb25af3..280a6c2 100644 --- a/src/ft_get_music.c +++ b/src/ft_get_music.c @@ -21,19 +21,12 @@ static void uint8_t len; len = ft_strlen(mlist->music_path); - if (FT_OS == 2) - len += 22; - else - len += 18; - ft_memdel((void**)&mlist->music_cmd); + len += ft_strlen(FT_MUS_CMD); + ft_memdel((void**)&mlist->music_cmd) - 2; if (!(mlist->music_cmd = (char *)malloc((len + 1) * sizeof(char)))) return ; - if (FT_OS == 2) - { - ft_sprintf(mlist->music_cmd, "aplay -f cd -t wav -q %s", - mlist->music_path); - } - else {} + ft_sprintf(mlist->music_cmd, FT_MUS_CMD, + mlist->music_path); } int8_t |