diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 00:26:09 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 00:26:09 +0100 |
commit | 1842a21f7187f32982f9f19623affbc48b4f4573 (patch) | |
tree | 37ac21c1fa4bdb5cac2e407015c3c2e23578c6c8 /inc | |
parent | defines are bav (diff) | |
download | 42-cub3d-1842a21f7187f32982f9f19623affbc48b4f4573.tar.gz 42-cub3d-1842a21f7187f32982f9f19623affbc48b4f4573.tar.bz2 42-cub3d-1842a21f7187f32982f9f19623affbc48b4f4573.tar.xz 42-cub3d-1842a21f7187f32982f9f19623affbc48b4f4573.tar.zst 42-cub3d-1842a21f7187f32982f9f19623affbc48b4f4573.zip |
I gotta figure out
Diffstat (limited to 'inc')
-rw-r--r-- | inc/cub3d.h | 10 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 13 |
2 files changed, 20 insertions, 3 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 063b06f..4151daa 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -116,14 +116,20 @@ uint8_t ft_use_args(int argc, const char *argv[], char *const envp[], t_cub *clist); /* +** ====== RAYCAST ====== +*/ + +void ft_castray(t_cub *cl); +void ft_floor_cast(t_cub *cl); +void ft_detect(t_cub *cl); + +/* ** ====== OTHER ====== */ void ft_set_minimap_scale(t_cub *clist); void ft_enable_music(t_cub *cl); void ft_music_fork(char **mcmd_words, char *const envp[]); -void ft_detect(t_cub *cl); -void ft_castray(t_cub *cl); int8_t ft_save_to_bmp(t_cub *cl); int ft_error(uint8_t retval, const char *errmsg, t_cub *clist); uint8_t ft_free_words(char **words); diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index d392f0c..ecbbaf3 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -16,7 +16,7 @@ #include <stddef.h> #include <stdlib.h> #include <stdint.h> -#include <pthread.h> +#include <sys/types.h> typedef struct s_win { @@ -108,6 +108,7 @@ typedef struct s_player { float pos_x; float pos_y; + float pos_z; float start_x; float start_y; float dir_x; @@ -125,10 +126,18 @@ typedef struct s_ray float y_ray_pos; float x_ray_dir; float y_ray_dir; + float x_ray_dir_bis; + float y_ray_dir_bis; float x_side_dist; float y_side_dist; float x_delta_dist; float y_delta_dist; + float floor_x; + float floor_y; + int16_t ceil_x; + int16_t ceil_y; + float row_dist; + float ceil_dist; int16_t wall_t; int16_t wall_b; uint8_t side; @@ -156,6 +165,8 @@ typedef struct s_map char **mcmd_words; int8_t x_step; int8_t y_step; + int8_t x_floor_step; + int8_t y_floor_step; size_t map_w; size_t map_h; size_t mapl_len; |