The Last Of Us Wall Texture
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
NO assets/textures/backRoom3.png
|
NO assets/textures/wallTlou.png
|
||||||
SO assets/textures/forest.png
|
SO assets/textures/wallTlou.png
|
||||||
WE assets/textures/backRoom3.png
|
WE assets/textures/wallTlou.png
|
||||||
EA assets/textures/backRoom3.png
|
EA assets/textures/wallTlou.png
|
||||||
|
|
||||||
F 30,55,55
|
F 30,55,55
|
||||||
C 255,255,255
|
C 255,255,255
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
BIN
assets/textures/wallTlou.png
Normal file
BIN
assets/textures/wallTlou.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
@@ -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: 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);
|
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];
|
c = mlx->dt->sq_map[mlx->dt->p_y][mlx->dt->p_x];
|
||||||
if (c == 'N')
|
if (c == 'N') // Norte - mira hacia arriba (Y negativo)
|
||||||
mlx->ply->angle = 3 * M_PI / 2;
|
mlx->ply->angle = M_PI / 2; // 90° - no 270°
|
||||||
if (c == 'S')
|
if (c == 'S') // Sur - mira hacia abajo (Y positivo)
|
||||||
mlx->ply->angle = M_PI / 2;
|
mlx->ply->angle = 3 * M_PI / 2; // 270° - no 90°
|
||||||
if (c == 'E')
|
if (c == 'E') // Este - mira hacia derecha (X positivo)
|
||||||
mlx->ply->angle = 0;
|
mlx->ply->angle = 0;
|
||||||
if (c == 'W')
|
if (c == 'W') // Oeste - mira hacia izquierda (X negativo)
|
||||||
mlx->ply->angle = M_PI;
|
mlx->ply->angle = M_PI; // 180°
|
||||||
mlx->ply->plyr_x = (mlx->dt->p_x * WALL_SIZE) + WALL_SIZE / 2;
|
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->plyr_y = (mlx->dt->p_y * WALL_SIZE) + WALL_SIZE / 2;
|
||||||
mlx->ply->fov_rd = (FOV * M_PI / 180);
|
mlx->ply->fov_rd = (FOV * M_PI / 180);
|
||||||
}
|
}
|
||||||
|
|
||||||
int execution(t_data *dt)
|
int execution(t_data *dt)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/12/05 17:11:09 by aortigos #+# #+# */
|
/* 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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user