This commit is contained in:
H3XploR
2025-02-25 00:29:49 +01:00
parent d3f205543e
commit f7e6dec6c4
4 changed files with 8 additions and 9 deletions
+5 -6
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/14 18:28:42 by yantoine #+# #+# */
/* Updated: 2025/02/17 21:07:31 by yantoine ### ########.fr */
/* Updated: 2025/02/25 00:29:27 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,13 +17,12 @@ int check_tokens(char **tokens, int expected)
return (tokens && ft_arraylen(tokens) == expected);
}
void check_if_max(t_scene scene, const int to_test, const int max)
int check_if_max(t_scene scene, const int to_test, const int max)
{
(void)scene;
if (to_test >= max)
{
printf("error:\n");
close(scene.fd_if_exit);
free(scene.line_if_exit);
exit(1);
return (0);
}
return (1);
}
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 20:02:36 by yantoine #+# #+# */
/* Updated: 2025/02/24 17:02:24 by yantoine ### ########.fr */
/* Updated: 2025/02/25 00:29:04 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -238,7 +238,7 @@ char **get_tokens_secure(t_scene scene, const int numObject,
int check_tokens(char **tokens, int expected);
int isdigit_token(char **tokens);
int have_extension(const char *line);
void check_if_max(t_scene scene, const int to_test, const int max);
int check_if_max(t_scene scene, const int to_test, const int max);
// Intersection
float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal);
+1 -1
View File
@@ -292,7 +292,7 @@ camera miniRT.h /^ t_camera camera;$/;" m struct:s_scene typeref:typename:t_came
center miniRT.h /^ t_vec3 center;$/;" m struct:s_cylinder typeref:typename:t_vec3
center miniRT.h /^ t_vec3 center;$/;" m struct:s_sphere typeref:typename:t_vec3
check minilibx-linux/Makefile.mk /^check: all$/;" t
check_if_max check.c /^void check_if_max(t_scene scene, const int to_test, const int max)$/;" f typeref:typename:void
check_if_max check.c /^int check_if_max(t_scene scene, const int to_test, const int max)$/;" f typeref:typename:int
check_number main.c /^static int check_number(t_scene scene)$/;" f typeref:typename:int file:
check_shadow_cylinder shadows.c /^static bool check_shadow_cylinder(const t_ray shadow_ray, float max_t,$/;" f typeref:typename:bool file:
check_shadow_plane shadows.c /^static bool check_shadow_plane(const t_ray shadow_ray, float max_t,$/;" f typeref:typename:bool file: