From fe145d4c59886b857b0966f8e9b673cfacc0695f Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 24 Feb 2020 22:20:33 +0100 Subject: found 2 infinit loops hehe --- inc/cub3d.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index 5f1c6f8..c3236a5 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -90,6 +90,7 @@ void ft_draw_life_bar(size_t map_w, const int8_t life, t_cub *cl); void ft_music(t_cub *cl); -void ft_draw_sprite(t_cub *cl, int i); +void ft_calc_sprite_norme(t_cub *cl); +void ft_draw_sprite(t_cub *cl); # endif -- cgit v1.2.3 From 3363be36b7ffe90fc335e07ebb1dae14366216e8 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 24 Feb 2020 23:14:16 +0100 Subject: gang --- inc/cub3d.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index c3236a5..8eebc00 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -90,6 +90,7 @@ void ft_draw_life_bar(size_t map_w, const int8_t life, t_cub *cl); void ft_music(t_cub *cl); +void ft_calc_sprite(t_cub *cl); void ft_calc_sprite_norme(t_cub *cl); void ft_draw_sprite(t_cub *cl); -- cgit v1.2.3 From cc85b0a701b558e18299822f7091fc2fd137b14b Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 25 Feb 2020 16:43:54 +0100 Subject: bunch of garbage --- inc/cub3d.h | 1 + inc/cub3d_structs.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index 8eebc00..24ea92a 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -93,5 +93,6 @@ void ft_music(t_cub *cl); void ft_calc_sprite(t_cub *cl); void ft_calc_sprite_norme(t_cub *cl); void ft_draw_sprite(t_cub *cl); +void ft_get_sprite_spawn(t_cub *cl); # endif diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index a173e8c..91a1ee9 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -50,6 +50,8 @@ typedef struct s_rgb typedef struct s_sprite { int32_t s_screen_x; + int32_t x; + int32_t y; int32_t s_pos_x; int32_t s_pos_y; double s_x; @@ -137,7 +139,7 @@ typedef struct s_cub struct s_rgb f_rgb; struct s_rgb c_rgb; struct s_img tlist[5]; - struct s_sprite sp_list; + struct s_sprite sprites; } t_cub; # endif -- cgit v1.2.3 From 51dd3734caadd0c3b943da3410772c65558280cc Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 25 Feb 2020 17:33:15 +0100 Subject: ??? --- inc/cub3d.h | 2 +- inc/cub3d_structs.h | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index 24ea92a..310e00d 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -92,7 +92,7 @@ void ft_draw_life_bar(size_t map_w, void ft_music(t_cub *cl); void ft_calc_sprite(t_cub *cl); void ft_calc_sprite_norme(t_cub *cl); -void ft_draw_sprite(t_cub *cl); +void ft_draw_sprite(t_cub *cl, t_sprite *sprite); void ft_get_sprite_spawn(t_cub *cl); # endif diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 91a1ee9..a8ae385 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -49,24 +49,26 @@ typedef struct s_rgb typedef struct s_sprite { - int32_t s_screen_x; + 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 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; + 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 sprite_transform_x; - double sprite_transform_y; + double transformx; + double transformy; double sprite_dist; - double inv_c_m; + double invdet; } t_sprite; typedef struct s_player -- cgit v1.2.3 From 859f84a4c6819e91d38b1cacdc39d94a7df71969 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 28 Feb 2020 10:57:51 +0100 Subject: on est al --- inc/cub3d_defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index c4be489..e201228 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -49,7 +49,7 @@ ** ====== MOVE SPEED ====== */ -# define FT_MOVE_SPEED 0.2 +# define FT_MOVE_SPEED 0.1 # define FT_STRAFE_SPEED 0.1 # define FT_ROT_SPEED 0.09 -- cgit v1.2.3 From af64bbe158db6801a2f498ca20eae5104cda10fd Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 28 Feb 2020 18:57:43 +0100 Subject: g --- inc/cub3d_structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index a8ae385..4847d1f 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -124,6 +124,7 @@ typedef struct s_map size_t map_start; uint8_t isspawn; uint8_t scale; + uint8_t isnlvl; } t_map; typedef struct s_cub -- cgit v1.2.3 From 82f823ceb63d76ce052db3bca74842fe37394eb4 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Thu, 5 Mar 2020 22:01:22 +0100 Subject: fuck --- inc/cub3d_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 4847d1f..102b985 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -50,6 +50,7 @@ typedef struct s_rgb typedef struct s_sprite { int32_t spritescreenx; + int8_t isvisible; int32_t x; int32_t y; int32_t tex_x; @@ -88,7 +89,6 @@ typedef struct s_ray { uint16_t line_h; float wall_dist; - float mid_dist; float x_ray_pos; float y_ray_pos; float x_ray_dir; -- cgit v1.2.3 From 04658c5e9a019917c3f8ffeb84562c328da0a885 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 6 Mar 2020 18:40:56 +0100 Subject: ils se cachent (mal) --- inc/cub3d_structs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 102b985..7b86d09 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -89,6 +89,7 @@ typedef struct s_ray { uint16_t line_h; float wall_dist; + float wall_dist_tab[4096]; float x_ray_pos; float y_ray_pos; float x_ray_dir; @@ -116,6 +117,8 @@ typedef struct s_map char *sprite_path; char *mapl; char **map; + int32_t sprite_nbr; + int32_t sprite_order[12]; int8_t x_step; int8_t y_step; size_t map_w; @@ -142,7 +145,7 @@ typedef struct s_cub struct s_rgb f_rgb; struct s_rgb c_rgb; struct s_img tlist[5]; - struct s_sprite sprites; + struct s_sprite sprites[12]; } t_cub; # endif -- cgit v1.2.3 From f00d3d412bdbbe45c6a84930e9d392bf915a25b9 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 9 Mar 2020 15:50:02 +0100 Subject: start over n --- inc/cub3d_structs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 7b86d09..b53f130 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -50,7 +50,6 @@ typedef struct s_rgb typedef struct s_sprite { int32_t spritescreenx; - int8_t isvisible; int32_t x; int32_t y; int32_t tex_x; -- cgit v1.2.3 From 7d50a78eed9c6cfce3288c471b9f3e6367bfe040 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 9 Mar 2020 17:50:45 +0100 Subject: gang --- inc/cub3d_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index b53f130..cceafec 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -88,7 +88,7 @@ typedef struct s_ray { uint16_t line_h; float wall_dist; - float wall_dist_tab[4096]; + float *wall_dist_tab; float x_ray_pos; float y_ray_pos; float x_ray_dir; -- cgit v1.2.3