diff options
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d_structs.h | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 1160015..3c7ae28 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -86,25 +86,29 @@ typedef struct s_rgb typedef struct s_sprite { - int32_t s_screen_x; - int32_t s_pos_x; - int32_t s_pos_y; - double s_x; - double s_y; - int32_t s_h; - int32_t s_w; - int32_t s_start_x; - int32_t s_start_y; - int32_t s_end_x; - int32_t s_end_y; - int32_t s_tex_y; - double sprite_transform_x; - double sprite_transform_y; - double sprite_dist; - double inv_c_m; -} t_sprite; - -typedef struct s_player + int32_t spritescreenx; + int32_t x; + int32_t y; + int32_t tex_x; + int32_t tex_y; + int32_t s_pos_x; + int32_t s_pos_y; + double spritex; + double spritey; + int32_t spriteheight; + int32_t spritewidth; + int32_t drawstartx; + int32_t drawstarty; + int32_t drawendx; + int32_t drawendy; + int32_t s_tex_y; + double transformx; + double transformy; + double sprite_dist; + double invdet; +} t_sprite; + +typedef struct s_player { float pos_x; float pos_y; @@ -122,6 +126,7 @@ 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; @@ -172,6 +177,8 @@ typedef struct s_map size_t map_w; size_t map_h; size_t mapl_len; + int32_t sprite_nbr; + int32_t sprite_order[12]; size_t line_chk; size_t map_start; uint8_t isspawn; @@ -210,7 +217,7 @@ typedef struct s_cub struct s_rgb f_rgb; struct s_rgb c_rgb; struct s_img tlist[8]; - struct s_sprite sp_list; + struct s_sprite sprites[12]; } t_cub; # endif |