add struct wall

This commit is contained in:
hugogogo
2022-04-28 09:35:05 +02:00
parent 5e8afcb245
commit 285f6f3c55
4 changed files with 32 additions and 29 deletions

View File

@@ -70,7 +70,6 @@ static void init_raycast(t_rcast *rcast)
dist = cos(dist) * ((SCREEN_WIDTH / 2) / sin(dist));
rcast->screen_width = SCREEN_WIDTH;
rcast->screen_height = SCREEN_HEIGHT;
rcast->wall_height = WALL_HEIGHT;
// screen dist
rcast->screen_dist.start.x = 0;
rcast->screen_dist.start.y = 0;
@@ -133,5 +132,6 @@ t_game *init_game(void)
// raycasting
init_raycast(&(game->rcast));
game->rcast.cell = game->map.cell;
game->wall.height = WALL_HEIGHT;
return (game);
}