From 9e1f4605408821b74c9e74216fbf995d29a3921c Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 15 Nov 2019 09:34:54 +0100 Subject: .cub file parsing --- parse/parse_resolution.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'parse/parse_resolution.c') diff --git a/parse/parse_resolution.c b/parse/parse_resolution.c index c8e0c7f..e63317e 100644 --- a/parse/parse_resolution.c +++ b/parse/parse_resolution.c @@ -1,9 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* parse_resolution.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/15 09:29:27 by cacharle #+# #+# */ +/* Updated: 2019/11/15 09:31:47 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "cub3d.h" -t_bool parse_resolution(t_parsing *parsing, char *line) +t_bool parse_resolution(t_parsing *parsing, char *line) { parsing->resolution_width = ft_atoi(line); - line = ft_strchr(line, ' '); + line = ft_strrchr(line, ' ') + 1; parsing->resolution_height = ft_atoi(line); return (TRUE); } -- cgit