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

@@ -26,6 +26,16 @@ typedef struct s_vec
t_coord end;
} t_vec;
/*
* struct for walls 3d drawing
*/
typedef struct s_wall
{
t_vec pos;
int height;
} t_wall;
/*
* struct with all elements for raycasting
*/
@@ -35,9 +45,6 @@ typedef struct s_rcast
t_vec screen_dist;
t_vec screen_size;
t_vec ray;
t_vec wall;
int tmp;
int wall_height;
int screen_width;
int screen_height;
int cell;
@@ -125,6 +132,7 @@ typedef struct s_game
t_plr plr;
// rays
t_rcast rcast;
t_wall wall;
// map
t_map map;
// map window