From fd666aba6fd34979ad11e1a90e17ed4fc279768a Mon Sep 17 00:00:00 2001 From: V-Fries Date: Tue, 26 Sep 2023 16:16:04 +0200 Subject: [PATCH] Normed last files --- include/parsing.h | 5 ++--- lib/libft/test/src/bitmask/bitmask_test.c | 6 +++--- src/gui/object_list_box/object_list_gui_box_draw.c | 5 +---- src/parsing/get_scene_content.c | 3 +-- src/parsing/line_parsing/parse_light.c | 7 ++----- src/parsing/parse_scene_content.c | 3 +-- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/include/parsing.h b/include/parsing.h index a067a80..9c2ebe0 100644 --- a/include/parsing.h +++ b/include/parsing.h @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* parsing.h :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: tdameros +#+ +:+ +#+ */ +/* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/05/10 23:24:00 by tdameros #+# #+# */ -/* Updated: 2023/09/25 03:35:14 by tdameros ### ########lyon.fr */ +/* Updated: 2023/09/26 16:15:09 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -20,7 +20,6 @@ typedef struct s_rt_file_requirements { bool camera; bool ambient_light; -// bool light; // TODO add this for mandatory part } t_rt_file_requirements; typedef struct s_checkerboard_parsing_data diff --git a/lib/libft/test/src/bitmask/bitmask_test.c b/lib/libft/test/src/bitmask/bitmask_test.c index cd0c847..31bcb99 100644 --- a/lib/libft/test/src/bitmask/bitmask_test.c +++ b/lib/libft/test/src/bitmask/bitmask_test.c @@ -6,7 +6,7 @@ /* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/25 13:50:43 by vfries #+# #+# */ -/* Updated: 2023/02/27 18:17:04 by vfries ### ########lyon.fr */ +/* Updated: 2023/09/26 16:15:46 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -36,8 +36,8 @@ bool ft_bitmask_test(void) return (ft_putstr_fd("Bitmask: set_all_bits_to_one()\n", STDERR_FILENO), ft_bitmask_free(&bitmask), false); if (set_all_bits_to_zero(bitmask) < 0) - return (ft_putstr_fd("Bitmask: set_all_bits_to_zero()\n", STDERR_FILENO), - ft_bitmask_free(&bitmask), false); + return (ft_putstr_fd("Bitmask: set_all_bits_to_zero()\n", + STDERR_FILENO), ft_bitmask_free(&bitmask), false); if (real_application_test()) return (ft_putstr_fd("Bitmask: real_application_test()\n", STDERR_FILENO), ft_bitmask_free(&bitmask), false); diff --git a/src/gui/object_list_box/object_list_gui_box_draw.c b/src/gui/object_list_box/object_list_gui_box_draw.c index 1779553..a12fdf8 100644 --- a/src/gui/object_list_box/object_list_gui_box_draw.c +++ b/src/gui/object_list_box/object_list_gui_box_draw.c @@ -6,7 +6,7 @@ /* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/07/18 17:11:00 by vfries #+# #+# */ -/* Updated: 2023/09/23 23:28:49 by vfries ### ########.fr */ +/* Updated: 2023/09/26 16:14:36 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -106,9 +106,6 @@ static void draw_object_and_light_gui_box(t_gui_box *self, t_engine *engine, while (i--) draw_object_and_light_gui_box_children(self->children.data + i, engine, (t_vector2i){self->position.x, self->position.y + y}); - // TODO Make a custom version of put_image_to_image() to not change the - // color if == COLOR_TRANSPARENT since it currently writes over the rounded - // edges } void draw_object_and_light_gui_box_children(t_gui_box *gui_box, diff --git a/src/parsing/get_scene_content.c b/src/parsing/get_scene_content.c index 90e5379..2b7a8fb 100644 --- a/src/parsing/get_scene_content.c +++ b/src/parsing/get_scene_content.c @@ -6,7 +6,7 @@ /* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/21 03:18:57 by vfries #+# #+# */ -/* Updated: 2023/04/21 03:18:58 by vfries ### ########lyon.fr */ +/* Updated: 2023/09/26 16:14:25 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -97,7 +97,6 @@ static char ***get_scene_content_from_lines(t_list *lines) { scene_content[lines_count] = ft_split_unless_in_quotes(lines->content, WHITE_SPACES); -// scene_content[lines_count] = ft_split(lines->content, ' '); // TODO for mandatory part if (scene_content[lines_count] == NULL) { free_scene_content(scene_content); diff --git a/src/parsing/line_parsing/parse_light.c b/src/parsing/line_parsing/parse_light.c index fd5bc05..691f416 100644 --- a/src/parsing/line_parsing/parse_light.c +++ b/src/parsing/line_parsing/parse_light.c @@ -6,7 +6,7 @@ /* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/21 03:19:09 by vfries #+# #+# */ -/* Updated: 2023/09/03 20:18:37 by vfries ### ########lyon.fr */ +/* Updated: 2023/09/26 16:14:17 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -24,9 +24,6 @@ int parse_light(t_engine *engine, char **scene_content_line, t_color color; t_light light; - (void)rt_file_requirements; // TODO remove this in mandatory part -// if (rt_file_requirements->light == true) -// return (error("Error\nLight already defined\n")); // TODO add this for mandatory part if (ft_split_len(scene_content_line) != 4) return (error("Error\nFailed to get light line\n")); if (get_position(scene_content_line[1], &position) < 0) @@ -36,9 +33,9 @@ int parse_light(t_engine *engine, char **scene_content_line, if (get_color(scene_content_line[3], &color) < 0) return (error("Error\nFailed to get light albedo\n")); color = vector3f_divide(color, 255.f); -// rt_file_requirements->light = true; // TODO add this for mandatory part light = light_create(position, color, brightness); if (add_light(engine, light) < 0) return (free_light(&light), -1); return (0); + (void)rt_file_requirements; } diff --git a/src/parsing/parse_scene_content.c b/src/parsing/parse_scene_content.c index e524591..29c4c9a 100644 --- a/src/parsing/parse_scene_content.c +++ b/src/parsing/parse_scene_content.c @@ -6,7 +6,7 @@ /* By: vfries +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/21 03:18:55 by vfries #+# #+# */ -/* Updated: 2023/09/24 03:47:34 by vfries ### ########.fr */ +/* Updated: 2023/09/26 16:14:45 by vfries ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -112,5 +112,4 @@ static bool are_requirements_met(t_rt_file_requirements rt_file_requirements) { return (rt_file_requirements.ambient_light && rt_file_requirements.camera); - // TODO add rt_file_requirements.light for mandatory part }