From a0f26d0407a2e514e9dcfd2baeef5ccd98f7b3dd Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 1 Feb 2020 12:33:55 +0100 Subject: texture selector, collision detection --- src/parse/parse.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/parse/parse.c') diff --git a/src/parse/parse.c b/src/parse/parse.c index f4b5b66..581056a 100644 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/15 09:29:21 by cacharle #+# #+# */ -/* Updated: 2020/01/30 12:03:54 by cacharle ### ########.fr */ +/* Updated: 2020/02/01 11:35:32 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,8 +32,8 @@ t_state *parse(char *filename) "parse configuration", state, lines)); } if ((state = parse_map(state, lines + i)) == NULL) - return (error_put_return_lines_state_destroy( - "parse map", state, lines)); + return (error_put_return_lines_state_destroy("parse map", + state, lines)); helper_free_splited(lines); return (state); } @@ -73,8 +73,6 @@ static t_option_parser g_option_parsers[] = {"C", parse_ceilling_color} }; -#define OPTIONS_PARSERS_SIZE (sizeof(g_option_parsers) / sizeof(t_option_parser)) - t_bool parse_line(t_state *state, char *line) { int i; @@ -82,7 +80,7 @@ t_bool parse_line(t_state *state, char *line) if (!*line) return (TRUE); i = -1; - while (++i < (int)OPTIONS_PARSERS_SIZE) + while (++i < (int)(sizeof(g_option_parsers) / sizeof(t_option_parser))) if (ft_strncmp(g_option_parsers[i].id, line, ft_strlen(g_option_parsers[i].id)) == 0) return (g_option_parsers[i].func( -- cgit