diff options
author | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 18:30:37 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 18:30:37 +0100 |
commit | d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7 (patch) | |
tree | dc63c1a193330cabf201fd4afab0c4b02a2d5f65 /inc/cub3d_structs.h | |
parent | Divided minimap scale by 4, Makefile update (diff) | |
download | 42-cub3d-d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7.tar.gz 42-cub3d-d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7.tar.bz2 42-cub3d-d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7.tar.xz 42-cub3d-d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7.tar.zst 42-cub3d-d91a3ef90ba3975b7c3bd47b69ce7febda2a77a7.zip |
Smooth
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d_structs.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index cc5d805..0c3cb7c 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -41,6 +41,11 @@ typedef struct s_player float pos_x; float pos_y; float view_side; + float dir_x; + float dir_y; + float cam_x; + float plane_x; + float plane_y; } t_player; /* typedef struct s_ray */ @@ -61,6 +66,21 @@ typedef struct s_player typedef struct s_ray { uint16_t line_h; + float wall_dist; + float x_ray_pos; + float y_ray_pos; + float x_ray_dir; + float y_ray_dir; + float x_side_dist; + float y_side_dist; + float x_delta_dist; + float y_delta_dist; + int16_t wall_t; + int16_t wall_b; + uint8_t side; + size_t sqx; + size_t sqy; + uint8_t hit; } t_ray; typedef struct s_cub @@ -72,6 +92,8 @@ typedef struct s_cub char *sprite_path; char *mapl; char **map; + int8_t x_step; + int8_t y_step; size_t map_w; size_t map_h; size_t line_chk; @@ -80,6 +102,7 @@ typedef struct s_cub uint8_t scale; struct s_win *wlist; struct s_player *plist; + struct s_ray rlist; struct s_img img; struct s_rgb f_rgb; struct s_rgb c_rgb; |