diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 17:46:28 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 17:46:28 +0200 |
commit | df8d32e84a60558c38a0d75496c82de657103648 (patch) | |
tree | 964706cdd49ea979e42eef21dfa6f5af4299a7ce /inc | |
parent | Commit (diff) | |
download | 42-cub3d-df8d32e84a60558c38a0d75496c82de657103648.tar.gz 42-cub3d-df8d32e84a60558c38a0d75496c82de657103648.tar.bz2 42-cub3d-df8d32e84a60558c38a0d75496c82de657103648.tar.xz 42-cub3d-df8d32e84a60558c38a0d75496c82de657103648.tar.zst 42-cub3d-df8d32e84a60558c38a0d75496c82de657103648.zip |
It's moving!
Diffstat (limited to 'inc')
-rw-r--r-- | inc/cub3d.h | 9 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 11 |
2 files changed, 15 insertions, 5 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 85e2ab3..aaf4f55 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -240,6 +240,15 @@ 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 |