wall grows proportionally

This commit is contained in:
hugogogo
2022-04-25 09:13:10 +02:00
parent 03f61d989b
commit 0d9e5879c0
4 changed files with 25 additions and 16 deletions

View File

@@ -70,6 +70,7 @@ 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;