Skip to content

Commit

Permalink
Normed last files
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Fries committed Sep 26, 2023
1 parent e88ce0f commit fd666ab
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
5 changes: 2 additions & 3 deletions include/parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/* ::: :::::::: */
/* parsing.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tdameros <tdameros@student.42lyon.fr> +#+ +:+ +#+ */
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/libft/test/src/bitmask/bitmask_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions src/gui/object_list_box/object_list_gui_box_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/parsing/get_scene_content.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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);
Expand Down
7 changes: 2 additions & 5 deletions src/parsing/line_parsing/parse_light.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand All @@ -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)
Expand All @@ -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;
}
3 changes: 1 addition & 2 deletions src/parsing/parse_scene_content.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: vfries <vfries@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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
}

0 comments on commit fd666ab

Please sign in to comment.