aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index 923e877..54973e8 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -42,6 +42,21 @@ typedef struct s_win
int16_t y_size;
} t_win;
+/*
+** view_side:
+** 1: North
+** 2: South
+** 3: East
+** 4: West
+*/
+
+typedef struct s_player
+{
+ size_t pos_x;
+ size_t pos_y;
+ uint8_t view_side;
+} t_player;
+
typedef struct s_cub
{
char *no_tex_path;
@@ -55,17 +70,12 @@ typedef struct s_cub
char **map;
size_t map_w;
size_t line_chk;
+ size_t map_start;
uint8_t isspawn;
struct s_win *wlist;
struct s_player *plist;
} t_cub;
-typedef struct s_player
-{
- size_t pos_x;
- size_t pos_y;
-} t_player;
-
t_win *ft_init_win(void);
t_cub *ft_init_cub(void);
int ft_key_event(int keycode, void *param);
@@ -83,6 +93,7 @@ int ft_get_f_color(char **words, t_cub *clist);
int ft_get_c_color(char **words, t_cub *clist);
int ft_get_map_first_line(char *line, t_cub *clist);
int ft_get_map_core(int fd, t_cub *clist);
+void ft_get_player_spawn(t_player *plist, t_cub *clist);
int ft_check_missing(t_cub *clist);
int8_t ft_check_map_line(char *line, uint8_t l, t_cub *clist);
size_t ft_get_line_len(char *line);