last changes
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/12/09 18:46:27 by aortigos #+# #+# */
|
/* Created: 2025/12/09 18:46:27 by aortigos #+# #+# */
|
||||||
/* Updated: 2025/12/09 19:56:57 by aortigos ### ########.fr */
|
/* Updated: 2025/12/09 20:56:36 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -59,16 +59,17 @@ int load_texture(t_tex *tex, t_turelist *l_ture)
|
|||||||
return (0);
|
return (0);
|
||||||
while (tmp)
|
while (tmp)
|
||||||
{
|
{
|
||||||
if (!tmp->name || !tmp->value)
|
if (tmp->name && tmp->value)
|
||||||
tmp = tmp->next;
|
{
|
||||||
if (!ft_strncmp(tmp->name, "NO", 2))
|
if (!ft_strncmp(tmp->name, "NO", 2))
|
||||||
tex->no = mlx_load_png(tmp->value);
|
tex->no = mlx_load_png(tmp->value);
|
||||||
else if (!ft_strncmp(tmp->name, "SO", 2))
|
else if (!ft_strncmp(tmp->name, "SO", 2))
|
||||||
tex->so = mlx_load_png(tmp->value);
|
tex->so = mlx_load_png(tmp->value);
|
||||||
else if (!ft_strncmp(tmp->name, "WE", 2))
|
else if (!ft_strncmp(tmp->name, "WE", 2))
|
||||||
tex->we = mlx_load_png(tmp->value);
|
tex->we = mlx_load_png(tmp->value);
|
||||||
else if (!ft_strncmp(tmp->name, "EA", 2))
|
else if (!ft_strncmp(tmp->name, "EA", 2))
|
||||||
tex->ea = mlx_load_png(tmp->value);
|
tex->ea = mlx_load_png(tmp->value);
|
||||||
|
}
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/12/01 08:48:55 by aortigos #+# #+# */
|
/* Created: 2025/12/01 08:48:55 by aortigos #+# #+# */
|
||||||
/* Updated: 2025/12/09 19:51:07 by aortigos ### ########.fr */
|
/* Updated: 2025/12/09 20:57:11 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ t_turelist *new_texture(char *line)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
while (ft_isspace(*line))
|
while (ft_isspace(*line))
|
||||||
line++;
|
line++;
|
||||||
if ((!ft_strncmp(line, "NO", 2) || !ft_strncmp(line, "sO", 2))
|
if ((!ft_strncmp(line, "NO", 2) || !ft_strncmp(line, "SO", 2))
|
||||||
|| !ft_strncmp(line, "WE", 2) || !ft_strncmp(line, "EA", 2))
|
|| !ft_strncmp(line, "WE", 2) || !ft_strncmp(line, "EA", 2))
|
||||||
{
|
{
|
||||||
list->name = ft_substr(line, 0, 2);
|
list->name = ft_substr(line, 0, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user