This commit is contained in:
H3XploR
2025-02-17 22:09:31 +01:00
parent 557de2b0a7
commit e36cfb5fde
27 changed files with 912 additions and 953 deletions
+7 -5
View File
@@ -6,18 +6,20 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/15 19:39:08 by yantoine #+# #+# */
/* Updated: 2025/02/15 19:44:19 by yantoine ### ########.fr */
/* Updated: 2025/02/17 21:29:55 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
#include "minRT.h"
#include "miniRT.h"
t_scene parsing_light(const char *line, t_scene scene)
t_scene parsing_light(t_scene scene)
{
const char **tokens = get_tokens_secure(scene, scene.numLights, MAX_LIGHTS, 4);
char **tokens;
tokens = get_tokens_secure(scene, scene.numLights, MAX_LIGHTS, 4);
scene.token_if_exit = tokens;
scene.lights[scene.numLights].pos = parse_vector(tokens[1], scene);
scene.lights[scene.numLights].brightness = ft_atof(tokens[2], scene);
scene.lights[scene.numLights].brightness = ft_atof(tokens[2]);
scene.lights[scene.numLights].color = parse_color(tokens[3], scene);
ft_free_array(tokens);
scene.numLights++;