The Last Of Us Wall Texture

This commit is contained in:
2026-02-10 01:29:28 +01:00
parent 9e67b061a0
commit 399bbeb7c8
6 changed files with 20 additions and 20 deletions

View File

@@ -1,9 +1,9 @@
NO assets/textures/backRoom3.png
SO assets/textures/forest.png
WE assets/textures/backRoom3.png
EA assets/textures/backRoom3.png
NO assets/textures/wallTlou.png
SO assets/textures/wallTlou.png
WE assets/textures/wallTlou.png
EA assets/textures/wallTlou.png
F 30,55,55
C 255,255,255

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/09 18:46:27 by aortigos #+# #+# */
/* Updated: 2026/01/11 16:02:05 by aortigos ### ########.fr */
/* Updated: 2026/02/10 01:05:11 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -75,22 +75,22 @@ int load_texture(t_tex *tex, t_texture_list *l_ture)
return (1);
}
void get_angle(t_mlx *mlx)
void get_angle(t_mlx *mlx)
{
char c;
char c;
c = mlx->dt->sq_map[mlx->dt->p_y][mlx->dt->p_x];
if (c == 'N')
mlx->ply->angle = 3 * M_PI / 2;
if (c == 'S')
mlx->ply->angle = M_PI / 2;
if (c == 'E')
mlx->ply->angle = 0;
if (c == 'W')
mlx->ply->angle = M_PI;
mlx->ply->plyr_x = (mlx->dt->p_x * WALL_SIZE) + WALL_SIZE / 2;
mlx->ply->plyr_y = (mlx->dt->p_y * WALL_SIZE) + WALL_SIZE / 2;
mlx->ply->fov_rd = (FOV * M_PI / 180);
c = mlx->dt->sq_map[mlx->dt->p_y][mlx->dt->p_x];
if (c == 'N') // Norte - mira hacia arriba (Y negativo)
mlx->ply->angle = M_PI / 2; // 90° - no 270°
if (c == 'S') // Sur - mira hacia abajo (Y positivo)
mlx->ply->angle = 3 * M_PI / 2; // 270° - no 90°
if (c == 'E') // Este - mira hacia derecha (X positivo)
mlx->ply->angle = 0;
if (c == 'W') // Oeste - mira hacia izquierda (X negativo)
mlx->ply->angle = M_PI; // 180°
mlx->ply->plyr_x = (mlx->dt->p_x * WALL_SIZE) + WALL_SIZE / 2;
mlx->ply->plyr_y = (mlx->dt->p_y * WALL_SIZE) + WALL_SIZE / 2;
mlx->ply->fov_rd = (FOV * M_PI / 180);
}
int execution(t_data *dt)

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/05 17:11:09 by aortigos #+# #+# */
/* Updated: 2026/01/25 16:44:09 by aortigos ### ########.fr */
/* Updated: 2026/02/10 01:24:28 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */