diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/so_long.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/so_long.h b/include/so_long.h index 1090358..ea43bc7 100644 --- a/include/so_long.h +++ b/include/so_long.h @@ -6,7 +6,7 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/08 14:14:02 by dkaiser #+# #+# */ -/* Updated: 2024/05/29 15:57:34 by dkaiser ### ########.fr */ +/* Updated: 2024/06/10 16:38:06 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,6 +62,7 @@ typedef struct s_actor t_vector direction; t_vector velocity; t_ivector size; + int steps; mlx_image_t *img; } t_actor; @@ -69,7 +70,7 @@ typedef struct s_tilemap { t_ivector grid_size; t_ivector tile_size; - char *tiles; + char *tiles; t_ivector player_start_tile; t_ivector exit_tile; mlx_image_t *collectible_img; @@ -86,14 +87,13 @@ typedef struct s_game int load_map_from_file(t_tilemap *tilemap, char *filename); int check_map(t_tilemap *map); -int check_for_valid_path(t_tilemap *map); +int check_for_valid_path(t_tilemap *map); int init(t_game *game); void loop(void *params); void player_process(t_game *game); -int draw(t_game *game); -int draw_walls(t_game *game); -void draw_exit(t_game *game); +void draw(t_game *game); +void draw_map(t_game *game); void on_key_input(mlx_key_data_t event, void *params); t_vector grid_to_screen_pos(t_ivector grid_pos, t_ivector tile_size); t_ivector screen_to_grid_pos(t_vector screen_pos, t_ivector tile_size); @@ -102,7 +102,7 @@ void set_tile(t_tilemap *map, int x, int y, enum e_tile type); int check_collision(t_collider a, t_collider b); int check_map_collision(t_collider collider, t_tilemap *map, enum e_tile type); -void move_and_slide(t_actor *actor, t_tilemap *map, +int move_and_slide(t_actor *actor, t_tilemap *map, double delta_time); int is_on_floor(t_collider collider, t_tilemap *map); |
