aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_select_get.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-29 16:09:52 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-29 16:09:52 +0100
commitbec06f4323a2cb2c0bc1594df797c529a35d41e2 (patch)
treee2dbc17ea4f8ab4485c90da51a18e32e28d01267 /src/ft_select_get.c
parentGood for now, I'll continue later (diff)
download42-cub3d-bec06f4323a2cb2c0bc1594df797c529a35d41e2.tar.gz
42-cub3d-bec06f4323a2cb2c0bc1594df797c529a35d41e2.tar.bz2
42-cub3d-bec06f4323a2cb2c0bc1594df797c529a35d41e2.tar.xz
42-cub3d-bec06f4323a2cb2c0bc1594df797c529a35d41e2.tar.zst
42-cub3d-bec06f4323a2cb2c0bc1594df797c529a35d41e2.zip
Got colors
Diffstat (limited to '')
-rw-r--r--src/ft_select_get.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ft_select_get.c b/src/ft_select_get.c
index eb68711..6c1900d 100644
--- a/src/ft_select_get.c
+++ b/src/ft_select_get.c
@@ -17,15 +17,17 @@ ft_get_id(char **words)
return (4);
if (!ft_strncmp(words[0], "S", 1))
return (5);
- /* if (!ft_strncmp(words[0], "F", 1)) */
- /* return (6); */
+ if (!ft_strncmp(words[0], "F", 1))
+ return (6);
+ if (!ft_strncmp(words[0], "C", 1))
+ return (7);
return (12);
}
uint8_t
ft_select_get(char **words, t_cub *clist)
{
- int (*fun_ptr[7])(char**, t_cub*);
+ int (*fun_ptr[8])(char**, t_cub*);
uint8_t id;
fun_ptr[0] = ft_get_res;
@@ -34,7 +36,8 @@ ft_select_get(char **words, t_cub *clist)
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[6] = ft_get_f_color;
+ fun_ptr[7] = ft_get_c_color;
if ((id = ft_get_id(words)) == 12)
{
ft_free_words(words);