diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-02 00:17:42 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-02 00:17:42 +0100 |
commit | 7f450e0664b7eb103358b0eeb0667033f7fead85 (patch) | |
tree | 024a02d21a47074344a2905280e5c4fd78c6eb8b /src/ft_select_get.c | |
parent | Preparing music (diff) | |
download | 42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.gz 42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.bz2 42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.xz 42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.tar.zst 42-cub3d-7f450e0664b7eb103358b0eeb0667033f7fead85.zip |
Another song
Diffstat (limited to 'src/ft_select_get.c')
-rw-r--r-- | src/ft_select_get.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/ft_select_get.c b/src/ft_select_get.c index c6251c2..9d97748 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -51,6 +51,8 @@ static int8_t return (-1); if (ret == 9 && (clist->mlist->nl_tex_path[0])) return (-1); + if (ret == 10 && (clist->mlist->music_path[0])) + return (-1); return (ret); } @@ -58,7 +60,7 @@ static int8_t ft_get_id(char **words, t_cub *clist) { int8_t ret; - char ref[11][3]; + char ref[12][3]; ft_memcpy(ref[0], "R\0", 3); ft_memcpy(ref[1], "NO", 3); @@ -69,12 +71,13 @@ static int8_t ft_memcpy(ref[6], "F\0", 3); ft_memcpy(ref[7], "C\0", 3); ft_memcpy(ref[8], "L\0", 3); - ft_memcpy(ref[9], "LT\0", 3); - ft_memcpy(ref[10], "", 1); + ft_memcpy(ref[9], "LT", 3); + ft_memcpy(ref[9], "MU", 3); + ft_memcpy(ref[11], "", 1); ret = 0; while (ft_strncmp(words[0], ref[ret], 3) && ref[ret][0]) ret++; - if (ret == 10) + if (ret == 11) ret = 12; ret = ft_check_exists(ret, clist); ret = ft_check_exists_two(ret, clist); @@ -84,19 +87,8 @@ static int8_t int8_t ft_select_get(char **words, t_cub *clist) { - int8_t (*fun_ptr[10])(char**, t_cub*); int8_t id; - fun_ptr[0] = ft_get_res; - fun_ptr[1] = ft_get_tex_no; - fun_ptr[2] = ft_get_tex_so; - fun_ptr[3] = ft_get_tex_ea; - fun_ptr[4] = ft_get_tex_we; - fun_ptr[5] = ft_get_sprite; - fun_ptr[6] = ft_get_f_color; - fun_ptr[7] = ft_get_c_color; - fun_ptr[8] = ft_get_path_nl; - fun_ptr[9] = ft_get_tex_nl; if ((id = ft_get_id(words, clist)) == 12) { ft_free_words(words); |