summaryrefslogtreecommitdiff
path: root/include/so_long.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/so_long.h')
-rw-r--r--include/so_long.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/so_long.h b/include/so_long.h
index 5d0d394..6f3800d 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/15 16:41:49 by dkaiser ### ########.fr */
+/* Updated: 2024/05/20 20:07:16 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -72,6 +72,7 @@ typedef struct s_tilemap
char *tiles;
t_ivector player_start_tile;
t_ivector exit_tile;
+ mlx_image_t *collectible_img;
} t_tilemap;
typedef struct s_game
@@ -90,12 +91,15 @@ 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 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);
enum e_tile get_tile(t_tilemap *map, int x, int y);
+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);
+int check_map_collision(t_collider collider, t_tilemap *map,
+ enum e_tile type);
void move_and_slide(t_actor *actor, t_tilemap *map,
double delta_time);
int is_on_floor(t_collider collider, t_tilemap *map);