last changes

This commit is contained in:
2025-12-09 21:44:19 +01:00
parent 936c4604fd
commit 7984591228
3 changed files with 14 additions and 1409 deletions

1396
raw.txt

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
while (tmp)
{
if (!tmp->name || !tmp->value)
tmp = tmp->next;
if (!ft_strncmp(tmp->name, "NO", 2))
tex->no = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "SO", 2))
tex->so = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "WE", 2))
tex->we = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "EA", 2))
tex->ea = mlx_load_png(tmp->value);
if (tmp->name && tmp->value)
{
if (!ft_strncmp(tmp->name, "NO", 2))
tex->no = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "SO", 2))
tex->so = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "WE", 2))
tex->we = mlx_load_png(tmp->value);
else if (!ft_strncmp(tmp->name, "EA", 2))
tex->ea = mlx_load_png(tmp->value);
}
tmp = tmp->next;
}
return (1);

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 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);
while (ft_isspace(*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))
{
list->name = ft_substr(line, 0, 2);