aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inc/cub3d.h18
-rw-r--r--src/ft_get_colors.c4
-rw-r--r--src/ft_get_res.c2
-rw-r--r--src/ft_get_sprite.c2
-rw-r--r--src/ft_get_tex.c8
-rw-r--r--src/ft_select_get.c7
6 files changed, 20 insertions, 21 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index cf35d92..1abcd1e 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -107,16 +107,16 @@ int ft_key_event(int keycode, void *param);
int ft_exit(uint8_t exit_code, t_cub *clist);
void ft_drawsquare(int a, int b, int rgb, t_cub *clist);
void ft_parse_map(const char *map_path, t_cub *clist);
-uint8_t ft_select_get(char **words, t_cub *clist);
+int8_t ft_select_get(char **words, t_cub *clist);
int8_t ft_get_screen_size(t_win *wlist);
-int ft_get_res(char **words, t_cub *clist);
-int ft_get_tex_no(char **words, t_cub *clist);
-int ft_get_tex_so(char **words, t_cub *clist);
-int ft_get_tex_ea(char **words, t_cub *clist);
-int ft_get_tex_we(char **words, t_cub *clist);
-int ft_get_sprite(char **words, t_cub *clist);
-int ft_get_f_color(char **words, t_cub *clist);
-int ft_get_c_color(char **words, t_cub *clist);
+int8_t ft_get_res(char **words, t_cub *clist);
+int8_t ft_get_tex_no(char **words, t_cub *clist);
+int8_t ft_get_tex_so(char **words, t_cub *clist);
+int8_t ft_get_tex_ea(char **words, t_cub *clist);
+int8_t ft_get_tex_we(char **words, t_cub *clist);
+int8_t ft_get_sprite(char **words, t_cub *clist);
+int8_t ft_get_f_color(char **words, t_cub *clist);
+int8_t ft_get_c_color(char **words, t_cub *clist);
int ft_get_map_first_line(char *line, t_cub *clist);
int ft_get_map_core(int fd, t_cub *clist);
void ft_get_player_spawn(t_player *plist, t_cub *clist);
diff --git a/src/ft_get_colors.c b/src/ft_get_colors.c
index 7d9d5d2..249ff5a 100644
--- a/src/ft_get_colors.c
+++ b/src/ft_get_colors.c
@@ -28,7 +28,7 @@ static int
return (0);
}
-int
+int8_t
ft_get_f_color(char **words, t_cub *clist)
{
char **num;
@@ -58,7 +58,7 @@ int
return (0);
}
-int
+int8_t
ft_get_c_color(char **words, t_cub *clist)
{
char **num;
diff --git a/src/ft_get_res.c b/src/ft_get_res.c
index 25f87fd..649ab23 100644
--- a/src/ft_get_res.c
+++ b/src/ft_get_res.c
@@ -27,7 +27,7 @@ static int8_t
return (0);
}
-int
+int8_t
ft_get_res(char **words, t_cub *clist)
{
t_win *wlist = clist->wlist;
diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c
index 641219d..490f538 100644
--- a/src/ft_get_sprite.c
+++ b/src/ft_get_sprite.c
@@ -14,7 +14,7 @@
#include <libft.h>
#include <cub3d.h>
-int
+int8_t
ft_get_sprite(char **words, t_cub *clist)
{
if (!(*words) || !words[1] || words[2])
diff --git a/src/ft_get_tex.c b/src/ft_get_tex.c
index 1826825..240f034 100644
--- a/src/ft_get_tex.c
+++ b/src/ft_get_tex.c
@@ -15,7 +15,7 @@
#include <cub3d.h>
#include <stdlib.h>
-int
+int8_t
ft_get_tex_no(char **words, t_cub *clist)
{
if (!(*words) || !(*(words + 1)) || (*(words + 2)))
@@ -26,7 +26,7 @@ int
return (0);
}
-int
+int8_t
ft_get_tex_so(char **words, t_cub *clist)
{
if (!(*words) || !(*(words + 1)) || (*(words + 2)))
@@ -37,7 +37,7 @@ int
return (0);
}
-int
+int8_t
ft_get_tex_ea(char **words, t_cub *clist)
{
if (!(*words) || !(*(words + 1)) || (*(words + 2)))
@@ -48,7 +48,7 @@ int
return (0);
}
-int
+int8_t
ft_get_tex_we(char **words, t_cub *clist)
{
if (!(*words) || !(*(words + 1)) || (*(words + 2)))
diff --git a/src/ft_select_get.c b/src/ft_select_get.c
index 74cd000..188a6de 100644
--- a/src/ft_select_get.c
+++ b/src/ft_select_get.c
@@ -60,14 +60,13 @@ static int8_t
ret++;
if (ret == 8)
ret = 12;
- ret = ft_check_exists(ret, clist);
- return (ret);
+ return (ret = ft_check_exists(ret, clist));
}
-uint8_t
+int8_t
ft_select_get(char **words, t_cub *clist)
{
- int (*fun_ptr[8])(char**, t_cub*);
+ int8_t (*fun_ptr[8])(char**, t_cub*);
int8_t id;
fun_ptr[0] = ft_get_res;