From df8d32e84a60558c38a0d75496c82de657103648 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 30 Mar 2020 17:46:28 +0200 Subject: It's moving! --- inc/cub3d.h | 9 +++++++++ inc/cub3d_structs.h | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index 85e2ab3..aaf4f55 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -239,6 +239,15 @@ void ft_timings(clock_t before, t_cub *cl); void ft_handle_firing(clock_t before, t_cub *cl); void ft_get_fps_count(clock_t before, t_cub *cl); +/* +** ====== BAD BOYS ====== +*/ + +void ft_select_bad_boy_action(t_cub *cl); +void ft_bb_wait(t_bad_boy *bl, t_sprite *sl, t_map *ml); +void ft_bb_walk(t_bad_boy *bl, t_sprite *sl, t_map *ml); +void ft_bb_fire(t_bad_boy *bl, t_sprite *sl, t_map *ml); + /* ** ====== DELETION ====== */ diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 329f8bb..9ebc305 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -104,8 +104,8 @@ typedef struct s_sprite int32_t y; int32_t tex_x; int32_t tex_y; - uint64_t s_pos_x; - uint64_t s_pos_y; + double s_pos_x; + double s_pos_y; double spritex; double spritey; int8_t exists; @@ -124,8 +124,8 @@ typedef struct s_sprite typedef struct s_player { - float pos_x; - float pos_y; + double pos_x; + double pos_y; float pos_z; float start_x; float start_y; @@ -228,7 +228,8 @@ typedef struct s_bad_boy { int8_t life; int8_t does; - void (*act[3])(struct s_sprite*, struct s_map*); + int8_t sleep; + void (*act[3])(struct s_bad_boy*, struct s_sprite*, t_map*); } t_bad_boy; typedef struct s_cub -- cgit v1.2.3