t_turelist to t_texture_list

This commit is contained in:
2025-12-11 19:58:18 +01:00
parent d296e1b6f2
commit 7b3364c2bf
5 changed files with 32 additions and 32 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/25 19:47:02 by aortigos #+# #+# */
/* Updated: 2025/12/11 19:47:53 by aortigos ### ########.fr */
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -55,7 +55,7 @@ typedef struct s_turelist
char *name;
char *value;
struct s_turelist *next;
} t_turelist;
} t_texture_list;
typedef struct s_player
{
@@ -95,7 +95,7 @@ typedef struct s_data
char **sq_map;
char **cc;
char **ff;
t_turelist *t_list;
t_texture_list *t_list;
} t_data;
typedef struct s_mlx
@@ -106,7 +106,7 @@ typedef struct s_mlx
t_data *dt; // the data structure
t_player *ply; // the player structure
t_tex *tex;
t_turelist *l_ture;
t_texture_list *l_ture;
} t_mlx;
@@ -122,13 +122,13 @@ int parsing(int ac, char **av, t_data *data);
void freetl(char *ture, char *line, int fd);
void free_map(t_data *data);
void free_m(t_mlx *mlx);
void freelist(t_turelist **txture);
void freelist(t_texture_list **txture);
// lst_textures.c
int get_index(char *line, int i);
t_turelist *new_texture(char *line);
void lst_back_ture(t_turelist **l_ture, t_turelist *new);
int lst_ture(t_data *m, t_turelist **l_ture);
t_texture_list *new_texture(char *line);
void lst_back_ture(t_texture_list **l_ture, t_texture_list *new);
int lst_ture(t_data *m, t_texture_list **l_ture);
// read_map.c
int is_surrounded(char *line);
@@ -146,8 +146,8 @@ int surrounded_by_one(char **map);
// textures.c
int check_color_values(char **rgb);
void ft_process_rgb_color(t_turelist *tmp, t_data *m);
int color_ture(t_data *m, t_turelist *l_ture);
void ft_process_rgb_color(t_texture_list *tmp, t_data *m);
int color_ture(t_data *m, t_texture_list *l_ture);
int check_color_textures(char *line);
int check_count_textures(t_data *m, int count);
@@ -199,8 +199,8 @@ int unit_circle(float angle, char c);
// execution.c
void render_frame(void *mlx_ptr);
int check_load_ture(t_turelist *list);
int load_texture(t_tex *tex, t_turelist *l_ture);
int check_load_ture(t_texture_list *list);
int load_texture(t_tex *tex, t_texture_list *l_ture);
void get_angle(t_mlx *mlx);
int execution(t_data *dt);

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/09 18:46:27 by aortigos #+# #+# */
/* Updated: 2025/12/11 19:48:18 by aortigos ### ########.fr */
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,9 +24,9 @@ void render_frame(void *mlx_ptr)
mlx_image_to_window(mlx->mlx_ptr, mlx->img, 0, 0);
}
int check_load_ture(t_turelist *list)
int check_load_ture(t_texture_list *list)
{
t_turelist *tmp;
t_texture_list *tmp;
mlx_texture_t *texture;
tmp = list;
@@ -48,9 +48,9 @@ int check_load_ture(t_turelist *list)
return (1);
}
int load_texture(t_tex *tex, t_turelist *l_ture)
int load_texture(t_tex *tex, t_texture_list *l_ture)
{
t_turelist *tmp;
t_texture_list *tmp;
if (!l_ture)
return (0);

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/28 20:03:22 by aortigos #+# #+# */
/* Updated: 2025/12/09 19:46:17 by aortigos ### ########.fr */
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -47,9 +47,9 @@ void free_m(t_mlx *mlx)
free2d(mlx->dt->cc);
}
void freelist(t_turelist **txture)
void freelist(t_texture_list **txture)
{
t_turelist *tmp;
t_texture_list *tmp;
tmp = *txture;
while (tmp)

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/01 08:48:55 by aortigos #+# #+# */
/* Updated: 2025/12/09 20:57:11 by aortigos ### ########.fr */
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,11 +19,11 @@ int get_index(char *line, int i)
return (i);
}
t_turelist *new_texture(char *line)
t_texture_list *new_texture(char *line)
{
t_turelist *list;
t_texture_list *list;
list = (t_turelist *)ft_calloc(sizeof(t_turelist), 1);
list = (t_texture_list *)ft_calloc(sizeof(t_texture_list), 1);
if (!list)
return (NULL);
while (ft_isspace(*line))
@@ -43,9 +43,9 @@ t_turelist *new_texture(char *line)
return (list);
}
void lst_back_ture(t_turelist **l_ture, t_turelist *new)
void lst_back_ture(t_texture_list **l_ture, t_texture_list *new)
{
t_turelist *tmp;
t_texture_list *tmp;
if (!*l_ture)
{
@@ -58,10 +58,10 @@ void lst_back_ture(t_turelist **l_ture, t_turelist *new)
tmp->next = new;
}
int lst_ture(t_data *m, t_turelist **l_ture)
int lst_ture(t_data *m, t_texture_list **l_ture)
{
int i;
t_turelist *tmp;
t_texture_list *tmp;
i = 0;
while (m->ture2d[i])

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/05 15:42:28 by aortigos #+# #+# */
/* Updated: 2025/12/09 19:55:01 by aortigos ### ########.fr */
/* Updated: 2025/12/11 19:57:55 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -23,7 +23,7 @@ int check_color_values(char **rgb)
return (free2d(rgb), 1);
}
void ft_process_rgb_color(t_turelist *tmp, t_data *m)
void ft_process_rgb_color(t_texture_list *tmp, t_data *m)
{
if (!ft_strncmp(tmp->name, "F", 2))
m->ff = ft_split(tmp->value, ',');
@@ -32,9 +32,9 @@ void ft_process_rgb_color(t_turelist *tmp, t_data *m)
return ;
}
int color_ture(t_data *m, t_turelist *l_ture)
int color_ture(t_data *m, t_texture_list *l_ture)
{
t_turelist *tmp;
t_texture_list *tmp;
char **colors;
m->cc = NULL;