game image created but all wrong

This commit is contained in:
hugogogo
2022-04-24 21:18:36 +02:00
parent a11ea35ac1
commit 03f61d989b
6 changed files with 50 additions and 33 deletions

View File

@@ -68,8 +68,8 @@ static void init_raycast(t_rcast *rcast)
dist = (SCREEN_FOCAL / 2) * M_PI / 180;
dist = cos(dist) * ((SCREEN_WIDTH / 2) / sin(dist));
rcast->screen_def = SCREEN_WIDTH;
rcast->screen_center = SCREEN_HEIGHT / 2;
rcast->screen_width = SCREEN_WIDTH;
rcast->screen_height = SCREEN_HEIGHT;
// screen dist
rcast->screen_dist.start.x = 0;
rcast->screen_dist.start.y = 0;