Skip to content

Commit

Permalink
try to fix the door wall texture cap. 723123
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAlabar committed Jan 26, 2025
1 parent 91b20cf commit 09d188d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file removed cub3D
Binary file not shown.
7 changes: 7 additions & 0 deletions srcs/engine/texture/texture_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ t_texture *texture_create(t_game *game, char *texture_path)

t_texture *get_wall_texture(t_ray *ray, t_game *game)
{
char tile;

tile = game->map.grid[ray->map_x][ray->map_y];
if (tile == 'D')
{
return (&game->door_system->doorwall_texture);
}
if (ray->is_door)
return (&game->door_system->door_texture);
if (ray->side == 0)
Expand Down

0 comments on commit 09d188d

Please # to comment.