diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/cub3d.h | 29 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 16 |
2 files changed, 37 insertions, 8 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 2042297..38d4e3f 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -85,8 +85,7 @@ void ft_draw_scene(t_cub *clist); void ft_draw_scene_bmp(t_cub *clist); void ft_draw_circle(float a, float b, int32_t color, t_cub *cl); -int8_t ft_draw_verline(t_cub *cl, int32_t x, - int32_t y1, int32_t y2); +void ft_draw_verline(t_cub *cl, int32_t x, int32_t y, int32_t y2); void ft_sprite_h_w(t_cub *cl, t_sprite *sprite); void ft_sort_sprites(t_cub *cl, int16_t i, int16_t j); void ft_sort_s_t(t_cub *cl, float dist_tab[8][4096]); @@ -102,6 +101,21 @@ void ft_draw_skybox(t_cub *cl); void ft_draw_handweap(t_cub *cl); void ft_macos_suffer_animation(t_cub *cl); void ft_linux_suffer_animation(t_cub *cl); +void *ft_ammo_back_thread(void *vargp); +void *ft_minimap_back_thread(void *vargp); +void *ft_map_thread(void *vargp); +void *ft_life_bar_thread(void *vargp); +void *ft_ammo_bar_thread(void *vargp); +void *ft_health_cap_thread(void *vargp); +void *ft_ammo_cap_thread(void *vargp); +void *ft_wall_one(void *vargp); +void *ft_wall_two(void *vargp); +void *ft_wall_three(void *vargp); +void *ft_wall_four(void *vargp); +void *ft_floor_one(void *vargp); +void *ft_floor_two(void *vargp); +void *ft_floor_three(void *vargp); +void *ft_floor_four(void *vargp); /* ** ====== PARSING ====== @@ -161,12 +175,19 @@ uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist); */ void ft_castray(t_cub *cl); -void ft_choose_tex(t_cub *clist); +void ft_choose_tex(uint16_t x, t_cub *clist); void ft_detect(t_cub *cl); void ft_detection_init_x(t_cub *cl); void ft_detection_init_y(t_cub *cl); -void ft_floor_cast(t_cub *cl); +void *ft_wall_cast(void *vargp); +void *ft_floor_cast(void *vargp); void ft_floor_cast_inits(uint16_t y, t_ray *rl, t_cub *cl); +void ft_calc_tex(t_cub *cl); +void ft_initray(uint16_t i, t_cub *cl); +void ft_castray_loop(uint16_t i, t_win *wl, t_cub *cl); +void ft_set_fc_tex_xy(uint8_t tid, uint16_t x, uint16_t y, t_cub *cl); +void ft_floor_loop(uint16_t y, t_cub *cl); +void ft_floor_cast_loop(uint16_t y, uint16_t x, t_cub *cl); /* ** ====== SFX ====== diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index bab7241..1b46312 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -85,6 +85,8 @@ typedef struct s_img int img_h; int tex_x; int tex_y; + int tex_x_alt; + int tex_y_alt; } t_img; typedef struct s_rgb @@ -142,7 +144,6 @@ typedef struct s_ray { uint16_t line_h; float wall_dist; - float *wall_dist_tab; float x_ray_pos; float y_ray_pos; float x_ray_dir; @@ -153,7 +154,6 @@ typedef struct s_ray float y_delta_dist; int16_t wall_t; int16_t wall_b; - int16_t *wall_bz; uint8_t side; size_t sqx; size_t sqy; @@ -168,8 +168,15 @@ typedef struct s_ray float row_dist; float x_floor; float y_floor; - int32_t x_cell; - int32_t y_cell; + int32_t *tex_x_tab; + int32_t ***fc_tex_x_tab; + int32_t ***fc_tex_y_tab; + float *row_dist_tab; + int16_t *wall_t_tab; + int16_t *wall_b_tab; + uint8_t *w_side_tab; + uint16_t *line_h_tab; + float *wall_dist_tab; } t_ray; typedef struct s_map @@ -234,6 +241,7 @@ typedef struct s_cub uint8_t doicast; uint16_t currlvl; uint16_t i; + uint16_t y; char errmsg[64]; int32_t key_input[5]; char fps_count[9]; |