update parsing ambient

This commit is contained in:
H3XploR
2025-02-14 20:53:18 +01:00
parent 1ecb24da74
commit 7cd536501d
7 changed files with 82 additions and 19 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/14 18:28:42 by yantoine #+# #+# */
/* Updated: 2025/02/14 18:51:17 by yantoine ### ########.fr */
/* Updated: 2025/02/14 20:15:29 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,9 +17,9 @@ inline int check_tokens(char **tokens, int expected)
return (tokens && ft_arraylen(tokens) == expected);
}
inline void check_if_max(t_scene scene, const int lower_than)
inline void check_if_max(t_scene scene, const int to_test, const int max)
{
if (scene.numAmbient >= lower_than)
if (to_test >= max)
{
printf("error:\n");
close(scene.fd_if_exit);