parsing/free.c mv to parsing/clean.c and function my_mlx_put_pixel changed to cub3d_put_pixel
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/11/25 19:47:02 by aortigos #+# #+# */
|
/* Created: 2025/11/25 19:47:02 by aortigos #+# #+# */
|
||||||
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
|
/* Updated: 2025/12/11 20:02:51 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -50,11 +50,11 @@ typedef struct s_tex
|
|||||||
mlx_texture_t *ea;
|
mlx_texture_t *ea;
|
||||||
} t_tex;
|
} t_tex;
|
||||||
|
|
||||||
typedef struct s_turelist
|
typedef struct s_texture_list
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
char *value;
|
char *value;
|
||||||
struct s_turelist *next;
|
struct s_texture_list *next;
|
||||||
} t_texture_list;
|
} t_texture_list;
|
||||||
|
|
||||||
typedef struct s_player
|
typedef struct s_player
|
||||||
@@ -193,7 +193,7 @@ void render_wall(t_mlx *mlx, int ray);
|
|||||||
// render2.c
|
// render2.c
|
||||||
int get_rgba(int r, int g, int b, int a);
|
int get_rgba(int r, int g, int b, int a);
|
||||||
int reverse_bytes(int c);
|
int reverse_bytes(int c);
|
||||||
void my_mlx_pixel_put(t_mlx *mlx, int x, int y, int color);
|
void cub3d_put_pixel(t_mlx *mlx, int x, int y, int color);
|
||||||
float nor_angle(float angle);
|
float nor_angle(float angle);
|
||||||
int unit_circle(float angle, char c);
|
int unit_circle(float angle, char c);
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/12/09 18:42:30 by aortigos #+# #+# */
|
/* Created: 2025/12/09 18:42:30 by aortigos #+# #+# */
|
||||||
/* Updated: 2025/12/09 19:55:21 by aortigos ### ########.fr */
|
/* Updated: 2025/12/11 20:02:51 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -21,12 +21,12 @@ void draw_floor_ceiling(t_mlx *mlx, int ray, int t_pix, int b_pix)
|
|||||||
c = get_rgba(ft_atoi(mlx->dt->ff[0]), ft_atoi(mlx->dt->ff[1]),
|
c = get_rgba(ft_atoi(mlx->dt->ff[0]), ft_atoi(mlx->dt->ff[1]),
|
||||||
ft_atoi(mlx->dt->ff[2]), 255);
|
ft_atoi(mlx->dt->ff[2]), 255);
|
||||||
while (i < S_H)
|
while (i < S_H)
|
||||||
my_mlx_pixel_put(mlx, ray, i++, c);
|
cub3d_put_pixel(mlx, ray, i++, c);
|
||||||
c = get_rgba(ft_atoi(mlx->dt->cc[0]), ft_atoi(mlx->dt->cc[1]),
|
c = get_rgba(ft_atoi(mlx->dt->cc[0]), ft_atoi(mlx->dt->cc[1]),
|
||||||
ft_atoi(mlx->dt->cc[2]), 255);
|
ft_atoi(mlx->dt->cc[2]), 255);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < t_pix)
|
while (i < t_pix)
|
||||||
my_mlx_pixel_put(mlx, ray, i++, c);
|
cub3d_put_pixel(mlx, ray, i++, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
mlx_texture_t *get_texture(t_mlx *mlx, int flag)
|
mlx_texture_t *get_texture(t_mlx *mlx, int flag)
|
||||||
@@ -78,7 +78,7 @@ void draw_wall(t_mlx *mlx, int t_pix, int b_pix, double wall_h)
|
|||||||
y_o = 0;
|
y_o = 0;
|
||||||
while (t_pix < b_pix)
|
while (t_pix < b_pix)
|
||||||
{
|
{
|
||||||
my_mlx_pixel_put(mlx, mlx->ray->index, t_pix, reverse_bytes(arr[(int)y_o
|
cub3d_put_pixel(mlx, mlx->ray->index, t_pix, reverse_bytes(arr[(int)y_o
|
||||||
* texture->width + (int)x_o]));
|
* texture->width + (int)x_o]));
|
||||||
y_o += factor;
|
y_o += factor;
|
||||||
t_pix++;
|
t_pix++;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/12/09 18:44:12 by aortigos #+# #+# */
|
/* Created: 2025/12/09 18:44:12 by aortigos #+# #+# */
|
||||||
/* Updated: 2025/12/09 18:44:40 by aortigos ### ########.fr */
|
/* Updated: 2025/12/11 20:02:51 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ int reverse_bytes(int c)
|
|||||||
return (b);
|
return (b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void my_mlx_pixel_put(t_mlx *mlx, int x, int y, int color)
|
void cub3d_put_pixel(t_mlx *mlx, int x, int y, int color)
|
||||||
{
|
{
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
return ;
|
return ;
|
||||||
|
|||||||
Reference in New Issue
Block a user