From 25247ca1f3ffc9485b02686f616c41a52f8eb82a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 00:00:07 +0100 Subject: Pas trop ecole opti memoire mais ok --- inc/cub3d_structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index f1dfdfc..144de6f 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -137,6 +137,7 @@ 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; -- cgit v1.2.3 From 79af897f235b2172ce37e6d30b829fa0928aef3a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:17:49 +0100 Subject: Good trap init --- inc/cub3d_structs.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 144de6f..9f48975 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -169,6 +169,7 @@ typedef struct s_map char *ce_tex_path; char *nlevel_path; char *skybox_path; + char *traps_path; char *music_path; char *music_cmd; char *mapl; @@ -181,6 +182,8 @@ typedef struct s_map size_t mapl_len; int32_t sprite_nbr; int32_t sprite_order[12]; + int32_t traps_nbr; + int32_t traps_order[12]; size_t line_chk; size_t map_start; uint8_t isspawn; @@ -189,6 +192,7 @@ typedef struct s_map uint8_t isftex; uint8_t isctex; uint8_t isskybox; + uint8_t istrap; uint8_t darklvl; uint8_t scale; uint32_t nlx; @@ -219,8 +223,9 @@ typedef struct s_cub struct s_img img; struct s_rgb f_rgb; struct s_rgb c_rgb; - struct s_img tlist[8]; + struct s_img tlist[16]; struct s_sprite sprites[4096]; + struct s_sprite traps[4096]; } t_cub; # endif -- cgit v1.2.3 From c1d1d76e0c88fbbbe4b1e0611a13a6a4df6cb424 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:59:17 +0100 Subject: Parsed traps --- inc/cub3d_structs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 9f48975..89e531a 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -214,8 +214,8 @@ typedef struct s_cub int32_t key_input[5]; pid_t mpid; int (*key_ptr[6])(struct s_cub*); - int8_t (*get_ptr[13])(char**, struct s_cub*); - char ref[14][3]; + int8_t (*get_ptr[14])(char**, struct s_cub*); + char ref[15][3]; struct s_win wlist; struct s_player plist; struct s_map mlist; @@ -225,7 +225,7 @@ typedef struct s_cub struct s_rgb c_rgb; struct s_img tlist[16]; struct s_sprite sprites[4096]; - struct s_sprite traps[4096]; + struct s_sprite traps[512]; } t_cub; # endif -- cgit v1.2.3 From c581c7e3543058f015bddf96d76ac2d771ea40a0 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 10:16:48 +0100 Subject: Nice parse --- inc/cub3d_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 89e531a..5ba3b38 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -192,7 +192,7 @@ typedef struct s_map uint8_t isftex; uint8_t isctex; uint8_t isskybox; - uint8_t istrap; + uint8_t istraps; uint8_t darklvl; uint8_t scale; uint32_t nlx; -- cgit v1.2.3 From b236416db21d03f7749e1c80d5b7abee70ea07d5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 12:38:21 +0100 Subject: Pretty cool animation --- inc/cub3d_structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 5ba3b38..7665e96 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -120,6 +120,7 @@ typedef struct s_player float cam_x; float plane_x; float plane_y; + int8_t life; } t_player; typedef struct s_ray -- cgit v1.2.3 From 17906f353bb6e87528f552891d7d4c91bb3ac789 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 14:38:52 +0100 Subject: why macos --- inc/cub3d_structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 7665e96..310ba90 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -222,6 +222,7 @@ typedef struct s_cub struct s_map mlist; struct s_ray rlist; struct s_img img; + struct s_img red_scr; struct s_rgb f_rgb; struct s_rgb c_rgb; struct s_img tlist[16]; -- cgit v1.2.3 From 7f77c9bc922fb608f689385d642304956afe0492 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 16:07:29 +0100 Subject: Performance --- inc/cub3d_structs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 310ba90..957d154 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -208,6 +208,7 @@ typedef struct s_cub uint8_t ishud; uint8_t walltexgood; uint8_t isoldmus; + uint8_t doicast; uint16_t currlvl; uint16_t i; char *const *envp; -- cgit v1.2.3 From 7b61072321c71c1612a7b33d2e8d722a49c5bc99 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 18:06:17 +0100 Subject: ca tue --- inc/cub3d_structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 957d154..7a30d09 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -182,9 +182,9 @@ typedef struct s_map size_t map_h; size_t mapl_len; int32_t sprite_nbr; - int32_t sprite_order[12]; + int32_t sprite_order[4096]; int32_t traps_nbr; - int32_t traps_order[12]; + int32_t traps_order[512]; size_t line_chk; size_t map_start; uint8_t isspawn; -- cgit v1.2.3