aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-08 00:26:09 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-08 00:26:09 +0100
commit1842a21f7187f32982f9f19623affbc48b4f4573 (patch)
tree37ac21c1fa4bdb5cac2e407015c3c2e23578c6c8 /inc
parentdefines are bav (diff)
download42-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.h10
-rw-r--r--inc/cub3d_structs.h13
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;