diff --git a/isdigit_token.c b/isdigit_token.c index eca669a..d016c83 100644 --- a/isdigit_token.c +++ b/isdigit_token.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* isdigit_token.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: yantoine +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/02/22 18:27:48 by yantoine #+# #+# */ +/* Updated: 2025/02/22 18:28:45 by yantoine ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "miniRT.h" int isdigit_token(char **tokens) @@ -11,7 +23,10 @@ int isdigit_token(char **tokens) j = -1; while (tokens[i][++j]) { - if (!ft_isdigit(tokens[i][j]) && tokens[i][j] != '\n' && tokens[i][j] != '-' && tokens[i][j] != ',') + if (!ft_isdigit(tokens[i][j]) \ + && tokens[i][j] != '\n' \ + && tokens[i][j] != '-' \ + && tokens[i][j] != ',') { printf("%c\n", tokens[i][j]); printf("%p\n", tokens[i]); diff --git a/miniRT.h b/miniRT.h index 9fb38db..e718fe6 100644 --- a/miniRT.h +++ b/miniRT.h @@ -6,7 +6,7 @@ /* By: yantoine +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/13 20:02:36 by yantoine #+# #+# */ -/* Updated: 2025/02/19 16:57:35 by yantoine ### ########.fr */ +/* Updated: 2025/02/22 18:29:15 by yantoine ### ########.fr */ /* */ /* ************************************************************************** */ @@ -236,8 +236,8 @@ char **get_tokens_secure(t_scene scene, const int numObject, // Check int check_tokens(char **tokens, int expected); +int isdigit_token(char **tokens); void check_if_max(t_scene scene, const int to_test, const int max); -int isdigit_token(char **tokens); // Intersection float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal); diff --git a/render.c b/render.c index c95e00d..4502af0 100644 --- a/render.c +++ b/render.c @@ -6,7 +6,7 @@ /* By: yantoine +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/17 19:24:30 by yantoine #+# #+# */ -/* Updated: 2025/02/19 16:59:45 by yantoine ### ########.fr */ +/* Updated: 2025/02/22 18:32:17 by yantoine ### ########.fr */ /* */ /* ************************************************************************** */ @@ -43,10 +43,9 @@ void render_scene(t_app *app) { const int total_pixels = app->win_height * app->win_width; static int done; - static int progress; - int y; - int x; - + static int progress; + int y; + int x; y = 0; while (y < app->win_height)